diff --git a/BankingJavaFxApp/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/mainwindow/MainWindow.kt b/BankingJavaFxApp/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/mainwindow/MainWindow.kt index 90a09c4c..1664cfc0 100755 --- a/BankingJavaFxApp/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/mainwindow/MainWindow.kt +++ b/BankingJavaFxApp/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/mainwindow/MainWindow.kt @@ -23,7 +23,7 @@ class MainWindow : View(messages["main.window.title"]) { prefHeight = 620.0 prefWidth = 1150.0 - top = MainMenuBar().root + top = MainMenuBar(presenter).root center { splitpane { diff --git a/BankingJavaFxApp/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/mainwindow/controls/MainMenuBar.kt b/BankingJavaFxApp/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/mainwindow/controls/MainMenuBar.kt index 53200fb8..ade46cb8 100644 --- a/BankingJavaFxApp/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/mainwindow/controls/MainMenuBar.kt +++ b/BankingJavaFxApp/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/mainwindow/controls/MainMenuBar.kt @@ -3,10 +3,11 @@ package net.dankito.banking.ui.javafx.dialogs.mainwindow.controls import javafx.scene.input.KeyCode import javafx.scene.input.KeyCodeCombination import javafx.scene.input.KeyCombination +import net.dankito.banking.ui.presenter.MainWindowPresenter import tornadofx.* -open class MainMenuBar : View() { +open class MainMenuBar(protected val presenter: MainWindowPresenter) : View() { override val root = menubar { @@ -14,6 +15,13 @@ open class MainMenuBar : View() { maxHeight = 30.0 menu(messages["main.window.menu.file"]) { + menu(messages["main.window.menu.file.new"]) { + item(messages["main.window.menu.file.new.account"], KeyCodeCombination(KeyCode.A, KeyCombination.SHORTCUT_DOWN)) { + action { presenter.showAddAccountDialog() } + } + } + + separator() item(messages["main.window.menu.file.quit"], KeyCodeCombination(KeyCode.Q, KeyCombination.SHORTCUT_DOWN)) { action { primaryStage.close() } diff --git a/BankingJavaFxApp/src/main/resources/Messages.properties b/BankingJavaFxApp/src/main/resources/Messages.properties index 3ec4997c..6c133f33 100755 --- a/BankingJavaFxApp/src/main/resources/Messages.properties +++ b/BankingJavaFxApp/src/main/resources/Messages.properties @@ -1,8 +1,5 @@ main.window.title=Banking -main.window.menu.file=File -main.window.menu.file.quit=Quit - ok=OK cancel=Cancel @@ -12,6 +9,12 @@ accounts=Accounts check=Check +main.window.menu.file=File +main.window.menu.file.new=New... +main.window.menu.file.new.account=Account +main.window.menu.file.quit=Quit + + accounts.view.context.menu.info=Info diff --git a/BankingJavaFxApp/src/main/resources/Messages_de.properties b/BankingJavaFxApp/src/main/resources/Messages_de.properties index 7f212ff5..47b675bc 100755 --- a/BankingJavaFxApp/src/main/resources/Messages_de.properties +++ b/BankingJavaFxApp/src/main/resources/Messages_de.properties @@ -1,8 +1,5 @@ main.window.title=Banking -main.window.menu.file=Datei -main.window.menu.file.quit=Beenden - ok=OK cancel=Abbrechen @@ -12,6 +9,12 @@ accounts=Konten check=Überprüfen +main.window.menu.file=Datei +main.window.menu.file.new=Neu... +main.window.menu.file.new.account=Konto +main.window.menu.file.quit=Beenden + + accounts.view.context.menu.info=Info