Skip to content
Snippets Groups Projects
Commit 58e7c119 authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Fix media path showing on empty path

parent 2565920a
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@ import de.tobias.playpad.pad.TimeMode;
import de.tobias.playpad.pad.content.PadContentFactory;
import de.tobias.playpad.viewcontroller.PadSettingsTabViewController;
import de.tobias.playpad.viewcontroller.cell.EnumCell;
import javafx.beans.binding.Bindings;
import javafx.beans.value.ChangeListener;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
......@@ -23,6 +24,8 @@ public class GeneralPadTabViewController extends PadSettingsTabViewController {
@FXML
private Label pathLabel;
@FXML
private Button showPathButton;
@FXML
private TextField titleTextField;
......@@ -45,7 +48,12 @@ public class GeneralPadTabViewController extends PadSettingsTabViewController {
load("view/option/pad", "GeneralTab", Localization.getBundle());
this.pad = pad;
if (pad.getPath() != null) {
pathLabel.setText(pad.getPath().toString());
} else {
pathLabel.setText(Localization.getString("padSettings.gen.label.media.empty"));
}
showPathButton.disableProperty().bind(Bindings.isEmpty(pad.getPaths()));
if (pad.getStatus() == PadStatus.PLAY || pad.getStatus() == PadStatus.PAUSE) {
deleteButton.setDisable(true);
......
......@@ -121,6 +121,7 @@ padSettings.button.delete=L\u00F6schen
padSettings.button.path.show=Pfad zeigen
padSettings.button.path.choose=Pfad w\u00E4hlen
padSettings.gen.label.media=Medien:
padSettings.gen.label.media.empty=<Keine Auswahl>
padSettings.gen.label.title=Titel:
padSettings.gen.label.volume=Lautst\u00E4rke:
padSettings.gen.label.timeDisplay=Zeitanzeige:
......
......@@ -10,7 +10,7 @@
<Label alignment="CENTER_RIGHT" prefWidth="150.0" text="%padSettings.gen.label.media"/>
<Label fx:id="pathLabel" text="Label" textOverrun="CENTER_ELLIPSIS"/>
<VBox HBox.hgrow="ALWAYS"/>
<Button mnemonicParsing="false" onAction="#showPathButtonHandler" text="%padSettings.button.path.show"/>
<Button fx:id="showPathButton" mnemonicParsing="false" onAction="#showPathButtonHandler" text="%padSettings.button.path.show"/>
</children>
</HBox>
<HBox spacing="14.0">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment