fixing up editor for 71

This commit is contained in:
benfry
2004-10-10 01:14:47 +00:00
parent efbf7e299f
commit c7cfbbf154
3 changed files with 23 additions and 16 deletions

View File

@@ -46,6 +46,8 @@ public class PdeEditorHeader extends JComponent {
JMenu menu;
JPopupMenu popup;
JMenuItem renameItem;
int menuLeft;
int menuRight;
@@ -166,6 +168,9 @@ public class PdeEditorHeader extends JComponent {
tabRight = new int[sketch.codeCount];
}
// disable rename on the first tab
renameItem.setEnabled(sketch.current != sketch.code[0]);
int x = PdePreferences.GUI_SMALL;
for (int i = 0; i < sketch.codeCount; i++) {
PdeCode code = sketch.code[i];
@@ -293,6 +298,7 @@ public class PdeEditorHeader extends JComponent {
}
});
menu.add(item);
renameItem = item;
item = new JMenuItem("Delete");
item.addActionListener(new ActionListener() {