diff --git a/app/src/cc/arduino/view/ShowUncertifiedBoardWarning.java b/app/src/cc/arduino/view/ShowUncertifiedBoardWarning.java
deleted file mode 100644
index 974608356..000000000
--- a/app/src/cc/arduino/view/ShowUncertifiedBoardWarning.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * This file is part of Arduino.
- *
- * Arduino is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * As a special exception, you may use this file as part of a free software
- * library without restriction. Specifically, if other files instantiate
- * templates or use macros or inline functions from this file, or you compile
- * this file and link it with other files to produce an executable, this
- * file does not by itself cause the resulting executable to be covered by
- * the GNU General Public License. This exception does not however
- * invalidate any other reasons why the executable file might be covered by
- * the GNU General Public License.
- *
- * Copyright 2015 Arduino LLC (http://www.arduino.cc/)
- */
-
-package cc.arduino.view;
-
-import processing.app.Preferences;
-
-import java.awt.*;
-
-public class ShowUncertifiedBoardWarning implements Runnable {
-
- private final Frame parent;
-
- public ShowUncertifiedBoardWarning(Frame parent) {
- this.parent = parent;
- }
-
- @Override
- public void run() {
- UncertifiedBoardWarning uncertifiedBoardWarning = new UncertifiedBoardWarning(parent, new EventListener() {
- @Override
- public void eventHappened(cc.arduino.view.Event event) {
- if (!"uncertified_board_warning_ok_pressed".equals(event.getActionCommand())) {
- return;
- }
- Preferences.set("uncertifiedBoardWarning_dontShowMeAgain", event.getPayload().get("dontShowMeAgain").toString());
- }
- });
- uncertifiedBoardWarning.setLocationRelativeTo(parent);
- uncertifiedBoardWarning.setVisible(true);
- }
-
-}
diff --git a/app/src/cc/arduino/view/UncertifiedBoardWarning.form b/app/src/cc/arduino/view/UncertifiedBoardWarning.form
deleted file mode 100644
index 90ea0a918..000000000
--- a/app/src/cc/arduino/view/UncertifiedBoardWarning.form
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
diff --git a/app/src/cc/arduino/view/UncertifiedBoardWarning.java b/app/src/cc/arduino/view/UncertifiedBoardWarning.java
deleted file mode 100644
index 8d53add20..000000000
--- a/app/src/cc/arduino/view/UncertifiedBoardWarning.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * This file is part of Arduino.
- *
- * Arduino is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * As a special exception, you may use this file as part of a free software
- * library without restriction. Specifically, if other files instantiate
- * templates or use macros or inline functions from this file, or you compile
- * this file and link it with other files to produce an executable, this
- * file does not by itself cause the resulting executable to be covered by
- * the GNU General Public License. This exception does not however
- * invalidate any other reasons why the executable file might be covered by
- * the GNU General Public License.
- *
- * Copyright 2015 Arduino LLC (http://www.arduino.cc/)
- */
-
-package cc.arduino.view;
-
-import javax.swing.*;
-import java.awt.*;
-
-import static processing.app.I18n._;
-
-public class UncertifiedBoardWarning extends javax.swing.JDialog {
-
- private final EventListener listener;
-
- public UncertifiedBoardWarning(Frame parent, EventListener listener) {
- super(parent);
- initComponents();
- this.listener = listener;
- }
-
- /**
- * This method is called from within the constructor to initialize the form.
- * WARNING: Do NOT modify this code. The content of this method is always
- * regenerated by the Form Editor.
- */
- @SuppressWarnings("unchecked")
- // //GEN-BEGIN:initComponents
- private void initComponents() {
-
- jLabel1 = new javax.swing.JLabel();
- dontShowMeAgain = new javax.swing.JCheckBox();
- ok = new javax.swing.JButton();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle(_("Uncertified board"));
- setModal(true);
- setName("uncertifiedBoardWarning"); // NOI18N
- setResizable(false);
-
- jLabel1.setText("" + _("This board comes from an uncertified manufacturer.") + "
" + _("We won't be able to provide any support if it doesn't work as expected.") + "");
- jLabel1.setVerticalAlignment(javax.swing.SwingConstants.TOP);
-
- dontShowMeAgain.setText(_("Don't show me again"));
- dontShowMeAgain.setName("dontShowMeAgain"); // NOI18N
-
- ok.setText(_("OK"));
- ok.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- okActionPerformed(evt);
- }
- });
-
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addContainerGap()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
- .addGroup(layout.createSequentialGroup()
- .addComponent(dontShowMeAgain)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 206, Short.MAX_VALUE)
- .addComponent(ok, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)))
- .addContainerGap())
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(dontShowMeAgain)
- .addComponent(ok))
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
-
- pack();
- }// //GEN-END:initComponents
-
- private void okActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okActionPerformed
- Event event = new Event(evt.getSource(), evt.getID(), "uncertified_board_warning_ok_pressed");
- event.getPayload().put("dontShowMeAgain", dontShowMeAgain.isSelected());
- listener.eventHappened(event);
- this.dispose();
- }//GEN-LAST:event_okActionPerformed
-
- /**
- * @param args the command line arguments
- */
- public static void main(String args[]) throws Exception {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- /* Create and display the dialog */
- java.awt.EventQueue.invokeLater(new Runnable() {
- public void run() {
- UncertifiedBoardWarning dialog = new UncertifiedBoardWarning(new javax.swing.JFrame(), new EventListener() {
-
- @Override
- public void eventHappened(Event event) {
- System.out.println(event);
- }
- });
- dialog.addWindowListener(new java.awt.event.WindowAdapter() {
- @Override
- public void windowClosing(java.awt.event.WindowEvent e) {
- System.exit(0);
- }
- });
- dialog.setVisible(true);
- }
- });
- }
-
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JCheckBox dontShowMeAgain;
- private javax.swing.JLabel jLabel1;
- private javax.swing.JButton ok;
- // End of variables declaration//GEN-END:variables
-}
diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java
index da3fc5d1d..bba813346 100644
--- a/app/src/processing/app/Editor.java
+++ b/app/src/processing/app/Editor.java
@@ -966,22 +966,15 @@ public class Editor extends JFrame implements RunnerListener {
class SerialMenuListener implements ActionListener {
- private final Frame parent;
private final String serialPort;
- private final String warning;
- public SerialMenuListener(Frame parent, String serialPort, String warning) {
- this.parent = parent;
+ public SerialMenuListener(String serialPort) {
this.serialPort = serialPort;
- this.warning = warning;
}
public void actionPerformed(ActionEvent e) {
selectSerialPort(serialPort);
base.onBoardOrPortChange();
- if (warning != null && !Preferences.getBoolean("uncertifiedBoardWarning_dontShowMeAgain")) {
- SwingUtilities.invokeLater(new ShowUncertifiedBoardWarning(parent));
- }
}
}
@@ -1063,7 +1056,7 @@ public class Editor extends JFrame implements RunnerListener {
String label = port.getLabel();
JCheckBoxMenuItem item = new JCheckBoxMenuItem(label, address.equals(selectedPort));
- item.addActionListener(new SerialMenuListener(this, address, port.getPrefs().get("warning")));
+ item.addActionListener(new SerialMenuListener(address));
serialMenu.add(item);
}
diff --git a/app/src/processing/app/Sketch.java b/app/src/processing/app/Sketch.java
index 54a9f9a0d..99e8e5d48 100644
--- a/app/src/processing/app/Sketch.java
+++ b/app/src/processing/app/Sketch.java
@@ -23,16 +23,12 @@
package processing.app;
-import cc.arduino.packages.BoardPort;
import cc.arduino.packages.Uploader;
-import cc.arduino.view.*;
import processing.app.debug.Compiler;
import processing.app.debug.Compiler.ProgressListener;
import processing.app.debug.RunnerException;
-import processing.app.debug.TargetBoard;
import processing.app.forms.PasswordAuthorizationDialog;
import processing.app.helpers.OSUtils;
-import processing.app.helpers.PreferencesMap;
import processing.app.helpers.PreferencesMapException;
import processing.app.packages.UserLibrary;
import static processing.app.I18n._;
@@ -46,8 +42,6 @@ import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
-import static processing.app.I18n._;
-
/**
* Stores information about files in the current sketch
@@ -1153,8 +1147,6 @@ public class Sketch {
* @return null if compilation failed, main class name if not
*/
public String build(String buildPath, boolean verbose) throws RunnerException, PreferencesMapException {
- useOriginalVidPidIfUncertified();
-
// run the preprocessor
editor.status.progressUpdate(20);
@@ -1204,38 +1196,6 @@ public class Sketch {
return success;
}
- private void useOriginalVidPidIfUncertified() {
- BoardPort boardPort = BaseNoGui.getDiscoveryManager().find(PreferencesData.get("serial.port"));
- if (boardPort == null) {
- return;
- }
- TargetBoard targetBoard = BaseNoGui.getTargetBoard();
- if (targetBoard == null) {
- return;
- }
- PreferencesMap boardPreferences = targetBoard.getPreferences();
- if (boardPreferences.containsKey("build.vid") && boardPreferences.containsKey("build.pid")) {
- if (!boardPreferences.containsKey("backup.build.vid")) {
- boardPreferences.put("backup.build.vid", boardPreferences.get("build.vid"));
- boardPreferences.put("backup.build.pid", boardPreferences.get("build.pid"));
- }
-
- if (boardPort.getPrefs().get("warning") != null) {
- boardPreferences.put("build.vid", boardPort.getPrefs().get("vid"));
- boardPreferences.put("build.pid", boardPort.getPrefs().get("pid"));
- } else {
- boardPreferences.put("build.vid", boardPreferences.get("backup.build.vid"));
- boardPreferences.put("build.pid", boardPreferences.get("backup.build.pid"));
- }
- }
-
- if (boardPort.getPrefs().get("warning") != null && !Preferences.getBoolean("uncertifiedBoardWarning_dontShowMeAgain")) {
- SwingUtilities.invokeLater(new ShowUncertifiedBoardWarning(editor));
- }
-
-
- }
-
protected boolean upload(String buildPath, String suggestedClassName, boolean usingProgrammer) throws Exception {
Uploader uploader = Compiler.getUploaderByPreferences(false);
diff --git a/arduino-core/src/cc/arduino/packages/discoverers/SerialDiscovery.java b/arduino-core/src/cc/arduino/packages/discoverers/SerialDiscovery.java
index 47b7a848e..354e88da3 100644
--- a/arduino-core/src/cc/arduino/packages/discoverers/SerialDiscovery.java
+++ b/arduino-core/src/cc/arduino/packages/discoverers/SerialDiscovery.java
@@ -41,11 +41,6 @@ import static processing.app.I18n._;
public class SerialDiscovery implements Discovery {
- static {
- //makes transifex happy
- _("Uncertified");
- }
-
private Timer serialBoardsListerTimer;
private final List serialBoardPorts;
diff --git a/arduino-core/src/cc/arduino/packages/discoverers/serial/SerialBoardsLister.java b/arduino-core/src/cc/arduino/packages/discoverers/serial/SerialBoardsLister.java
index 142d763a0..58ad2e509 100644
--- a/arduino-core/src/cc/arduino/packages/discoverers/serial/SerialBoardsLister.java
+++ b/arduino-core/src/cc/arduino/packages/discoverers/serial/SerialBoardsLister.java
@@ -39,8 +39,6 @@ import processing.app.helpers.PreferencesMap;
import java.util.*;
-import static processing.app.I18n._;
-
public class SerialBoardsLister extends TimerTask {
private static final int MAX_TIME_AWAITING_FOR_PACKAGES = 5000;
@@ -98,17 +96,9 @@ public class SerialBoardsLister extends TimerTask {
TargetBoard board = (TargetBoard) boardData.get("board");
if (board != null) {
- String warningKey = "vid." + boardData.get("vid").toString() + ".warning";
- String warning = board.getPreferences().get(warningKey);
- prefs.put("warning", warning);
-
String boardName = board.getName();
if (boardName != null) {
- if (warning != null) {
- label += " (" + boardName + " - " + _(warning) + ")";
- } else {
- label += " (" + boardName + ")";
- }
+ label += " (" + boardName + ")";
}
boardPort.setBoardName(boardName);
}