Serial speed menu now controls debugging, not download, baud rate; renamed accordingly. Cleaned up menus.

This commit is contained in:
David A. Mellis 2006-01-15 20:35:31 +00:00
parent 766b816864
commit 2335c14d99
1 changed files with 31 additions and 31 deletions

View File

@ -642,7 +642,7 @@ public class Editor extends JFrame
item.setState(true); item.setState(true);
String name = item.getLabel(); String name = item.getLabel();
Preferences.set("serial.download_rate", name); Preferences.set("serial.debug_rate", name);
//System.out.println("serial port speed set to " + name); //System.out.println("serial port speed set to " + name);
} }
@ -675,7 +675,7 @@ public class Editor extends JFrame
// The serial options // The serial options
serialSubMenu = new JMenu("Serial port"); serialSubMenu = new JMenu("Serial Port");
// item = newJMenuItem("Update List", 'E', false); // item = newJMenuItem("Update List", 'E', false);
// item.addActionListener(new ActionListener() { // item.addActionListener(new ActionListener() {
@ -695,13 +695,13 @@ public class Editor extends JFrame
// add the serial speed submenu // add the serial speed submenu
serialRateSubMenu = new JMenu("Serial port speed"); serialRateSubMenu = new JMenu("Serial Monitor Baud Rate");
//serialSubMenu.add(item); //serialSubMenu.add(item);
//serialSubMenu.addSeparator(); //serialSubMenu.addSeparator();
ButtonGroup group = new ButtonGroup(); ButtonGroup group = new ButtonGroup();
int curr_rate = Preferences.getInteger("serial.download_rate"); int curr_rate = Preferences.getInteger("serial.debug_rate");
rbMenuItem = new JCheckBoxMenuItem("9600", 9600 == curr_rate); rbMenuItem = new JCheckBoxMenuItem("9600", 9600 == curr_rate);
rbMenuItem.addActionListener(srml); rbMenuItem.addActionListener(srml);
@ -793,26 +793,26 @@ public class Editor extends JFrame
}); });
menu.add(item); menu.add(item);
item = newJMenuItem("Find in Reference", 'F', true); // item = newJMenuItem("Find in Reference", 'F', true);
item.addActionListener(new ActionListener() { // item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { // public void actionPerformed(ActionEvent e) {
if (textarea.isSelectionActive()) { // if (textarea.isSelectionActive()) {
String text = textarea.getSelectedText(); // String text = textarea.getSelectedText();
if (text.length() == 0) { // if (text.length() == 0) {
message("First select a word to find in the reference."); // message("First select a word to find in the reference.");
//
} else { // } else {
String referenceFile = PdeKeywords.getReference(text); // String referenceFile = PdeKeywords.getReference(text);
if (referenceFile == null) { // if (referenceFile == null) {
message("No reference available for \"" + text + "\""); // message("No reference available for \"" + text + "\"");
} else { // } else {
Base.showReference(referenceFile); // Base.showReference(referenceFile);
} // }
} // }
} // }
} // }
}); // });
menu.add(item); // menu.add(item);
item = newJMenuItem("Visit arduino.berlios.de", '5'); item = newJMenuItem("Visit arduino.berlios.de", '5');
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
@ -1954,13 +1954,13 @@ public class Editor extends JFrame
this.addSeparator(); this.addSeparator();
referenceItem = new JMenuItem("Find in Reference"); // referenceItem = new JMenuItem("Find in Reference");
referenceItem.addActionListener(new ActionListener() { // referenceItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { // public void actionPerformed(ActionEvent e) {
Base.showReference(referenceFile); // Base.showReference(referenceFile);
} // }
}); // });
this.add(referenceItem); // this.add(referenceItem);
} }
// if no text is selected, disable copy and cut menu items // if no text is selected, disable copy and cut menu items