diff --git a/app/src/cc/arduino/view/preferences/Preferences.java b/app/src/cc/arduino/view/preferences/Preferences.java index bdbfabf08e9..736ae826cfe 100644 --- a/app/src/cc/arduino/view/preferences/Preferences.java +++ b/app/src/cc/arduino/view/preferences/Preferences.java @@ -132,9 +132,7 @@ private void initComponents() { enableCodeFoldingBox = new javax.swing.JCheckBox(); verifyUploadBox = new javax.swing.JCheckBox(); externalEditorBox = new javax.swing.JCheckBox(); - cacheCompiledCore = new javax.swing.JCheckBox(); checkUpdatesBox = new javax.swing.JCheckBox(); - updateExtensionBox = new javax.swing.JCheckBox(); saveVerifyUploadBox = new javax.swing.JCheckBox(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); @@ -248,7 +246,7 @@ public void mouseEntered(java.awt.event.MouseEvent evt) { arduinoNotRunningLabel.setForeground(Color.GRAY); arduinoNotRunningLabel.setText(tr("(edit only when Arduino is not running)")); - checkboxesContainer.setLayout(new javax.swing.BoxLayout(checkboxesContainer, javax.swing.BoxLayout.Y_AXIS)); + checkboxesContainer.setLayout(new GridLayout(0,2)); displayLineNumbersBox.setText(tr("Display line numbers")); checkboxesContainer.add(displayLineNumbersBox); @@ -277,15 +275,9 @@ public void mouseEntered(java.awt.event.MouseEvent evt) { checkboxesContainer.add(externalEditorBox); - cacheCompiledCore.setText(tr("Aggressively cache compiled core")); - checkboxesContainer.add(cacheCompiledCore); - checkUpdatesBox.setText(tr("Check for updates on startup")); checkboxesContainer.add(checkUpdatesBox); - updateExtensionBox.setText(tr("Update sketch files to new extension on save (.pde -> .ino)")); - checkboxesContainer.add(updateExtensionBox); - saveVerifyUploadBox.setText(tr("Save when verifying or uploading")); checkboxesContainer.add(saveVerifyUploadBox); @@ -322,7 +314,7 @@ public void itemStateChanged(java.awt.event.ItemEvent evt) { .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() - .addComponent(sketchbookLocationField, javax.swing.GroupLayout.DEFAULT_SIZE, 553, Short.MAX_VALUE) + .addComponent(sketchbookLocationField, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(browseButton)) .addComponent(checkboxesContainer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) @@ -631,13 +623,13 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 691, Short.MAX_VALUE) + .addGap(0, 800, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 580, Short.MAX_VALUE) + .addGap(0, 400, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); @@ -730,7 +722,6 @@ private void autoScaleCheckBoxItemStateChanged(java.awt.event.ItemEvent evt) {// private javax.swing.JCheckBox enableCodeFoldingBox; private javax.swing.JButton extendedAdditionalUrlFieldWindow; private javax.swing.JCheckBox externalEditorBox; - private javax.swing.JCheckBox cacheCompiledCore; private javax.swing.JTextField fontSizeField; private javax.swing.JLabel fontSizeLabel; private javax.swing.JLabel jLabel1; @@ -759,7 +750,6 @@ private void autoScaleCheckBoxItemStateChanged(java.awt.event.ItemEvent evt) {// private javax.swing.JLabel showVerboseLabel; private javax.swing.JTextField sketchbookLocationField; private javax.swing.JLabel sketchbookLocationLabel; - private javax.swing.JCheckBox updateExtensionBox; private javax.swing.JCheckBox verboseCompilationBox; private javax.swing.JCheckBox verboseUploadBox; private javax.swing.JCheckBox verifyUploadBox; @@ -834,12 +824,8 @@ private void savePreferencesData() { PreferencesData.setBoolean("editor.external", externalEditorBox.isSelected()); - PreferencesData.setBoolean("compiler.cache_core", cacheCompiledCore.isSelected()); - PreferencesData.setBoolean("update.check", checkUpdatesBox.isSelected()); - PreferencesData.setBoolean("editor.update_extension", updateExtensionBox.isSelected()); - PreferencesData.setBoolean("editor.save_on_verify", saveVerifyUploadBox.isSelected()); PreferencesData.set("boardsmanager.additional.urls", additionalBoardsManagerField.getText().replace("\r\n", "\n").replace("\r", "\n").replace("\n", ",")); @@ -906,11 +892,15 @@ private void showPreferencesData() { externalEditorBox.setSelected(PreferencesData.getBoolean("editor.external")); - cacheCompiledCore.setSelected(PreferencesData.get("compiler.cache_core") == null || PreferencesData.getBoolean("compiler.cache_core")); + if (PreferencesData.get("compiler.cache_core") == null) { + PreferencesData.setBoolean("compiler.cache_core", true); + } checkUpdatesBox.setSelected(PreferencesData.getBoolean("update.check")); - updateExtensionBox.setSelected(PreferencesData.get("editor.update_extension") == null || PreferencesData.getBoolean("editor.update_extension")); + if (PreferencesData.get("editor.update_extension") == null) { + PreferencesData.setBoolean("editor.update_extension", true); + } saveVerifyUploadBox.setSelected(PreferencesData.getBoolean("editor.save_on_verify"));