Skip to content

Commit 6f668b2

Browse files
committed
tools and help kt works
1 parent 44d1161 commit 6f668b2

4 files changed

Lines changed: 10 additions & 35 deletions

File tree

--force-with-leas

Whitespace-only changes.

--force-with-lease

Whitespace-only changes.

app/src/processing/app/ui/ComposeTopBar.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ fun TopBar(panel: ComposePanel, base: Base, editor: Editor) {
6060
//showMenuPopup(p, b, e, x, y)
6161
},
6262
TopBarItemData("Tools") { p, b, e, x, y ->
63-
showMenuPopup(p, b, e, x, y)
63+
showToolsPopup(p, e,x,y )
6464
},
65-
TopBarItemData("Help") { p, b, e, x, y ->
66-
showMenuPopup(p, b, e, x, y)
65+
TopBarItemData("Help") { p, _, e, x, y ->
66+
showHelpPopup(p, e, x, y)
6767
},
6868
TopBarItemData("Develop") { p, _, e, x, y ->
6969
showDevelopPopup(p, e, x, y)
@@ -150,7 +150,7 @@ private fun showSketchPopup(panel: ComposePanel, editor: Editor, x: Int, y: Int)
150150
}
151151

152152
private fun showToolsPopup(panel: ComposePanel, editor: Editor, x: Int, y: Int) {
153-
val menu = editor.buildToolsMenu()
153+
val menu = editor.getToolMenu()
154154
showPopupFromMenu(panel, menu, x, y)
155155
}
156156

app/src/processing/app/ui/Editor.java

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
along with this program; if not, write to the Free Software Foundation,
2121
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2222
*/
23-
// comment comment hi hi hi
23+
2424
package processing.app.ui;
2525

2626
import com.formdev.flatlaf.util.SystemInfo;
@@ -664,12 +664,6 @@ public void updateTheme() {
664664
repaint(); // for good measure
665665
}
666666

667-
668-
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
669-
670-
671-
//I FOUND MY FUNCTION IN HERE TO CALL ****
672-
673667
protected void buildMenuBar() {
674668
JMenuBar menubar = new JMenuBar();
675669
fileMenu = buildFileMenu(); //here is the file menu call
@@ -1049,7 +1043,7 @@ public void sketchChanged() { }
10491043

10501044
public JMenu getToolMenu() {
10511045
return toolsMenu;
1052-
} //TOOL MENU CODE!!!!!1
1046+
}
10531047

10541048

10551049
/**
@@ -1081,30 +1075,11 @@ public JMenu buildModeMenu() {
10811075
return null;
10821076
}
10831077

1084-
public void buildToolsMenu() {
1085-
toolsMenu = new JMenu(Language.text("menu.tools"));
10861078

1087-
var updateTrigger = new JMenuItem(Language.text("menu.tools.check_for_updates"));
1088-
updateTrigger.addActionListener(e -> {
1089-
Preferences.unset("update.last");
1090-
Preferences.setInteger("update.beta_welcome", 0);
1091-
new UpdateCheck(base);
1092-
});
1093-
toolsMenu.add(updateTrigger);
1079+
public JMenu buildHelpMenu(){
1080+
return null;
10941081
}
10951082

1096-
public void buildHelpMenu(){
1097-
JMenu helpMenu = new JMenu(Language.text("menu.develop"));
1098-
1099-
var updateTrigger = new JMenuItem(Language.text("menu.help.check_for_updates"));
1100-
updateTrigger.addActionListener(e -> {
1101-
Preferences.unset("update.last");
1102-
Preferences.setInteger("update.beta_welcome", 0);
1103-
new UpdateCheck(base);
1104-
});
1105-
helpMenu.add(updateTrigger);
1106-
} //HELP MENU CODE!!!!
1107-
11081083
public void buildDevelopMenu(){
11091084
developMenu = new JMenu(Language.text("menu.develop"));
11101085

@@ -2040,7 +2015,7 @@ public void handleIndentOutdent(boolean indent) {
20402015
sketch.setModified(true);
20412016
}
20422017

2043-
2018+
20442019
/**
20452020
* Moves the selected lines up or down in the text editor.
20462021
*
@@ -2890,7 +2865,7 @@ public List<Problem> findProblems(int line) {
28902865
int stopOffset = p.getStopOffset();
28912866
int pEndOffset = lineOffset + (stopOffset == -1 ? 0 : stopOffset);
28922867
int pEndLine = textarea.getLineOfOffset(pEndOffset);
2893-
2868+
28942869
return line >= pStartLine && line <= pEndLine;
28952870
})
28962871
.collect(Collectors.toList());

0 commit comments

Comments
 (0)