Moving language selection up in the preferences dialog.

This commit is contained in:
David A. Mellis 2012-04-08 14:51:37 -04:00
parent fbc23b50d7
commit c03ea000a2
1 changed files with 17 additions and 26 deletions

View File

@ -346,9 +346,25 @@ public class Preferences {
top += vmax + GUI_BETWEEN;
// Preferred language: [ ] (requires restart of Arduino)
Container box = Box.createHorizontalBox();
label = new JLabel(_("Editor Language: "));
box.add(label);
comboLanguage = new JComboBox(languages);
comboLanguage.setSelectedIndex((Arrays.asList(languagesISO)).indexOf(Preferences.get("editor.languages.current")));
box.add(comboLanguage);
label = new JLabel(_(" (requires restart of Arduino)"));
box.add(label);
pain.add(box);
d = box.getPreferredSize();
box.setForeground(Color.gray);
box.setBounds(left, top, d.width, d.height);
right = Math.max(right, left + d.width);
top += d.height + GUI_BETWEEN;
// Editor font size [ ]
Container box = Box.createHorizontalBox();
box = Box.createHorizontalBox();
label = new JLabel(_("Editor font size: "));
box.add(label);
fontSizeField = new JTextField(4);
@ -426,31 +442,6 @@ public class Preferences {
top += d.height + GUI_BETWEEN;
}
//Label for the language combo box
box = Box.createHorizontalBox();
label = new JLabel(_("Preferred Language: "));
box.add(label);
//Create the combo box, select the item at index 4.
comboLanguage = new JComboBox(languages);
comboLanguage.setSelectedIndex((Arrays.asList(languagesISO)).indexOf(Preferences.get("editor.languages.current")));
comboLanguage.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
JComboBox cb = (JComboBox)evt.getSource();
// the update to the language is done outside
}
});
box.add(comboLanguage);
label = new JLabel(_(" (requires restart of Arduino)"));
box.add(label);
pain.add(box);
d = box.getPreferredSize();
box.setForeground(Color.gray);
box.setBounds(left, top, d.width, d.height);
right = Math.max(right, left + d.width);
top += d.height + GUI_BETWEEN;
// More preferences are in the ...
label = new JLabel(_("More preferences can be edited directly in the file"));