mirror of
https://github.com/ACINQ/eclair.git
synced 2025-02-22 06:21:42 +01:00
(gui) channel pane context always built in JavaFX thread
This commit is contained in:
parent
b8379ed461
commit
698808b90f
1 changed files with 16 additions and 11 deletions
|
@ -1,5 +1,6 @@
|
|||
package fr.acinq.eclair.gui.controllers
|
||||
|
||||
import javafx.application.Platform
|
||||
import javafx.beans.value.{ChangeListener, ObservableValue}
|
||||
import javafx.fxml.FXML
|
||||
import javafx.scene.control.{Button, ContextMenu, ProgressBar, TextField}
|
||||
|
@ -27,17 +28,21 @@ class ChannelPaneController(theirNodeIdValue: String, val channelParams: LocalPa
|
|||
var contextMenu: ContextMenu = _
|
||||
|
||||
private def buildChannelContextMenu = {
|
||||
contextMenu = ContextMenuUtils.buildCopyContext(List(
|
||||
new CopyAction("Copy Channel Id", channelId.getText),
|
||||
new CopyAction("Copy Node Pubkey", theirNodeIdValue)
|
||||
))
|
||||
contextMenu.getStyleClass.add("context-channel")
|
||||
channelId.setContextMenu(contextMenu)
|
||||
amountUs.setContextMenu(contextMenu)
|
||||
nodeId.setContextMenu(contextMenu)
|
||||
capacity.setContextMenu(contextMenu)
|
||||
funder.setContextMenu(contextMenu)
|
||||
state.setContextMenu(contextMenu)
|
||||
Platform.runLater(new Runnable() {
|
||||
override def run = {
|
||||
contextMenu = ContextMenuUtils.buildCopyContext(List(
|
||||
new CopyAction("Copy Channel Id", channelId.getText),
|
||||
new CopyAction("Copy Node Pubkey", theirNodeIdValue)
|
||||
))
|
||||
contextMenu.getStyleClass.add("context-channel")
|
||||
channelId.setContextMenu(contextMenu)
|
||||
amountUs.setContextMenu(contextMenu)
|
||||
nodeId.setContextMenu(contextMenu)
|
||||
capacity.setContextMenu(contextMenu)
|
||||
funder.setContextMenu(contextMenu)
|
||||
state.setContextMenu(contextMenu)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@FXML def initialize = {
|
||||
|
|
Loading…
Add table
Reference in a new issue