Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Commit

Permalink
Remove the Help menu from the menu bar
Browse files Browse the repository at this point in the history
There is nothing to show at this time.

Refs #58.

Signed-off-by: Alexandre Montplaisir <[email protected]>
  • Loading branch information
Alexandre Montplaisir committed Feb 19, 2018
1 parent 1d0edb8 commit cf67aa9
Showing 1 changed file with 28 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,35 +32,34 @@ private const val ABOUT_ACTION = "About..."
class ScopeMenuBar : MenuBar() {

init {
/* "File" menu */
val openMenuItem = MenuItem(OPEN_ACTION).apply {
menus.addAll(FileMenu(),
ViewMenu()
// HelpMenu()
)
}


private inner class FileMenu : Menu(FILE_MENU) {

private val openMenuItem = MenuItem(OPEN_ACTION).apply {
setOnAction { openTraceAction(this@ScopeMenuBar) }
}
val closeMenuItem = MenuItem(CLOSE_ACTION).apply {
private val closeMenuItem = MenuItem(CLOSE_ACTION).apply {
setOnAction { ViewGroupContextManager.getCurrent().switchProject(null) }
}
val exitMenuItem = MenuItem(EXIT_ACTION).apply {
private val exitMenuItem = MenuItem(EXIT_ACTION).apply {
setOnAction { scene.window.hide() }
}
val fileMenu = Menu(FILE_MENU).apply {

init {
items.addAll(openMenuItem,
closeMenuItem,
SeparatorMenuItem(),
exitMenuItem)
}

/* "Help" menu */
val aboutMenuItem = MenuItem(ABOUT_ACTION).apply {
// TODO Open an About window...
// setOnAction { ... }
}
val helpMenu = Menu(HELP_MENU).apply {
items.addAll(aboutMenuItem)
}

menus.addAll(fileMenu, ViewMenu(), helpMenu)
}


private class ViewMenu : Menu(VIEW_MENU) {

private val rmi1 = RadioMenuItem(TIMESTAMP_FORMAT_OPTION_FULL_DATE).apply {
Expand Down Expand Up @@ -101,5 +100,18 @@ class ScopeMenuBar : MenuBar() {

}


private class HelpMenu : Menu(HELP_MENU) {

private val aboutMenuItem = MenuItem(ABOUT_ACTION).apply {
// TODO Open an About window...
// setOnAction { ... }
}

init {
items.addAll(aboutMenuItem)
}
}

}

0 comments on commit cf67aa9

Please sign in to comment.