Skip to content
Snippets Groups Projects
Commit 77494db6 authored by tobias's avatar tobias
Browse files

Fixed PadSettings Window Titel for Empty Pad

parent 0f2621a0
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,7 @@ UI.Window.Main.Title=Play Wall [Projekt: {} - Profil: {}] ...@@ -23,6 +23,7 @@ UI.Window.Main.Title=Play Wall [Projekt: {} - Profil: {}]
UI.Window.Changelog.Title=Was ist neu? UI.Window.Changelog.Title=Was ist neu?
UI.Window.Settings.Title=Einstellungen - {} UI.Window.Settings.Title=Einstellungen - {}
UI.Window.PadSettings.Title=Kachel Einstellungen - {} | {} UI.Window.PadSettings.Title=Kachel Einstellungen - {} | {}
UI.Window.PadSettings.Title.Empty=Kachel Einstellungen - {}
UI.Dialog.DragAndDrop.Title=Drag and Drop UI.Dialog.DragAndDrop.Title=Drag and Drop
UI.Dialog.ProjectExport.Title=Projekt exportieren UI.Dialog.ProjectExport.Title=Projekt exportieren
UI.Dialog.ErrorSummary.Title=Fehlerbericht UI.Dialog.ErrorSummary.Title=Fehlerbericht
......
...@@ -22,6 +22,7 @@ public class Strings { ...@@ -22,6 +22,7 @@ public class Strings {
public static final String UI_Window_Changelog_Title = "UI.Window.Changelog.Title"; public static final String UI_Window_Changelog_Title = "UI.Window.Changelog.Title";
public static final String UI_Window_Settings_Title = "UI.Window.Settings.Title"; public static final String UI_Window_Settings_Title = "UI.Window.Settings.Title";
public static final String UI_Window_PadSettings_Title = "UI.Window.PadSettings.Title"; public static final String UI_Window_PadSettings_Title = "UI.Window.PadSettings.Title";
public static final String UI_Window_PadSettings_Title_Empty = "UI.Window.PadSettings.Title.Empty";
public static final String UI_Dialog_DragAndDrop_Title = "UI.Dialog.DragAndDrop.Title"; public static final String UI_Dialog_DragAndDrop_Title = "UI.Dialog.DragAndDrop.Title";
public static final String UI_Dialog_ProjectExport_Title = "UI.Dialog.ProjectExport.Title"; public static final String UI_Dialog_ProjectExport_Title = "UI.Dialog.ProjectExport.Title";
public static final String UI_Dialog_ErrorSummary_Title = "UI.Dialog.ErrorSummary.Title"; public static final String UI_Dialog_ErrorSummary_Title = "UI.Dialog.ErrorSummary.Title";
......
...@@ -7,6 +7,7 @@ import de.tobias.playpad.PlayPadMain; ...@@ -7,6 +7,7 @@ import de.tobias.playpad.PlayPadMain;
import de.tobias.playpad.PlayPadPlugin; import de.tobias.playpad.PlayPadPlugin;
import de.tobias.playpad.Strings; import de.tobias.playpad.Strings;
import de.tobias.playpad.pad.Pad; import de.tobias.playpad.pad.Pad;
import de.tobias.playpad.pad.PadStatus;
import de.tobias.playpad.pad.conntent.PadContentConnect; import de.tobias.playpad.pad.conntent.PadContentConnect;
import de.tobias.playpad.pad.conntent.PadContentRegistry; import de.tobias.playpad.pad.conntent.PadContentRegistry;
import de.tobias.playpad.pad.conntent.UnkownPadContentException; import de.tobias.playpad.pad.conntent.UnkownPadContentException;
...@@ -44,7 +45,8 @@ public class PadSettingsViewController extends ViewController implements IPadSet ...@@ -44,7 +45,8 @@ public class PadSettingsViewController extends ViewController implements IPadSet
if (pad.getContent() != null) { if (pad.getContent() != null) {
try { try {
// Get Pad Type specific tab // Get Pad Type specific tab
PadContentConnect padContentConnect = PadContentRegistry.getPadContentConnect(pad.getContent().getType()); PadContentConnect padContentConnect = PadContentRegistry
.getPadContentConnect(pad.getContent().getType());
PadSettingsTabViewController contentTab = padContentConnect.getSettingsViewController(pad); PadSettingsTabViewController contentTab = padContentConnect.getSettingsViewController(pad);
if (contentTab != null) if (contentTab != null)
addTab(contentTab); addTab(contentTab);
...@@ -54,8 +56,7 @@ public class PadSettingsViewController extends ViewController implements IPadSet ...@@ -54,8 +56,7 @@ public class PadSettingsViewController extends ViewController implements IPadSet
} }
// Listener // Listener
PlayPadPlugin.getImplementation().getPadSettingsViewListener().forEach(l -> PlayPadPlugin.getImplementation().getPadSettingsViewListener().forEach(l -> {
{
try { try {
l.onInit(this); l.onInit(this);
} catch (Exception e) { } catch (Exception e) {
...@@ -71,7 +72,13 @@ public class PadSettingsViewController extends ViewController implements IPadSet ...@@ -71,7 +72,13 @@ public class PadSettingsViewController extends ViewController implements IPadSet
} }
private void setTitle(Pad pad) { private void setTitle(Pad pad) {
getStage().setTitle(Localization.getString(Strings.UI_Window_PadSettings_Title, pad.getIndexReadable(), pad.getName())); if (pad.getStatus() != PadStatus.EMPTY) {
getStage().setTitle(
Localization.getString(Strings.UI_Window_PadSettings_Title, pad.getIndexReadable(), pad.getName()));
} else {
getStage().setTitle(
Localization.getString(Strings.UI_Window_PadSettings_Title_Empty, pad.getIndexReadable()));
}
} }
@Override @Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment