Compare commits

..

No commits in common. "af3a291536fd86e9b563dd38cab0741dd41c6eea" and "cf075853611d1593a98d34e3dd807606f6ccf20c" have entirely different histories.

5 changed files with 86894 additions and 203708 deletions

View File

@ -110,19 +110,9 @@ internal class EntryCell(private val resources: ResourceBundle, private val conf
) )
) )
val definition = when { val definition = entry.cedictDefinitions.joinToString(
entry.cedictDefinitions.isNotEmpty() -> entry.cedictDefinitions.joinToString( separator = " / "
separator = " / " ) { it.joinToString(separator = "; ") }
) { it.joinToString(separator = "; ") }
entry.crossStraitsDefinitions.isNotEmpty() -> entry.crossStraitsDefinitions.joinToString(
separator = " / "
) { it.definition }
entry.moedictDefinitions.isNotEmpty() -> entry.moedictDefinitions.joinToString(
separator = " / "
) { it.definition }
else -> error("No definition for entry")
}
labelDefinition.text = definition labelDefinition.text = definition
contextMenu = createContextMenuForEntry(entry, resources) contextMenu = createContextMenuForEntry(entry, resources)

View File

@ -12,7 +12,6 @@ import javafx.fxml.FXML
import javafx.scene.control.Label import javafx.scene.control.Label
import javafx.scene.control.ListView import javafx.scene.control.ListView
import javafx.scene.control.ProgressIndicator import javafx.scene.control.ProgressIndicator
import javafx.scene.control.Tab
import javafx.scene.control.TabPane import javafx.scene.control.TabPane
import javafx.scene.input.ContextMenuEvent import javafx.scene.input.ContextMenuEvent
import javafx.scene.layout.FlowPane import javafx.scene.layout.FlowPane
@ -44,9 +43,6 @@ class DetailsController(private val model: Model, private val config: Config) {
@FXML @FXML
private lateinit var tabPaneDetails: TabPane private lateinit var tabPaneDetails: TabPane
@FXML
private lateinit var tabCharacters: Tab
@FXML @FXML
private lateinit var webViewDefinition: WebView private lateinit var webViewDefinition: WebView
@ -156,15 +152,6 @@ class DetailsController(private val model: Model, private val config: Config) {
lazyUpdateTabContent(tabPaneDetails.selectionModel.selectedItem.id) lazyUpdateTabContent(tabPaneDetails.selectionModel.selectedItem.id)
} }
tabCharacters.disableProperty().bind(
Bindings.createBooleanBinding(
{
(model.selectedEntry.value?.traditionalProperty?.value?.length ?: 0) < 2
},
model.selectedEntry
)
)
} }
private fun initializeListViewWords() { private fun initializeListViewWords() {

View File

@ -37,8 +37,6 @@ class PreferencesDialog(
} }
val root = fxmlLoader.load(javaClass.getResourceAsStream("/fxml/dialogs/preferences.fxml")) as DialogPane val root = fxmlLoader.load(javaClass.getResourceAsStream("/fxml/dialogs/preferences.fxml")) as DialogPane
root.prefHeightProperty().bind(dialogPane.scene.heightProperty())
root.prefWidthProperty().bind(dialogPane.scene.widthProperty())
dialogPane = root dialogPane = root
title = "Settings" title = "Settings"

View File

@ -35,7 +35,7 @@
<ProgressIndicator fx:id="progressIndicatorWords" visible="false"/> <ProgressIndicator fx:id="progressIndicatorWords" visible="false"/>
</StackPane> </StackPane>
</Tab> </Tab>
<Tab fx:id="tabCharacters" id="tabCharacters" closable="false" text="%tab.characters"> <Tab id="tabCharacters" closable="false" text="%tab.characters">
<StackPane> <StackPane>
<ListView fx:id="listViewCharacters"/> <ListView fx:id="listViewCharacters"/>
<Label fx:id="labelNoCharactersFound" text="%list.no_characters_found" textAlignment="CENTER" <Label fx:id="labelNoCharactersFound" text="%list.no_characters_found" textAlignment="CENTER"

File diff suppressed because it is too large Load Diff