Skip to content

Commit

Permalink
Merge branch 'release/7.0.2' into 'master'
Browse files Browse the repository at this point in the history
Release/7.0.2

See merge request PlayWall/PlayWallDesktop!9
  • Loading branch information
Tobisaninfo committed Oct 25, 2020
2 parents 57e643d + c6da274 commit 401b32c
Show file tree
Hide file tree
Showing 17 changed files with 42 additions and 26 deletions.
1 change: 1 addition & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public boolean useMultipleResourceBundles() {

@Override
public Locale getLocale() {
return Locale.getDefault();
// TODO Locale GERMAN
return Locale.GERMAN;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,12 @@ private void initKeyboardMapper() {

// Request Focus for key listener
getParent().requestFocus();

getParent().getScene().focusOwnerProperty().addListener((observable, oldValue, newValue) -> {
if (newValue == null) {
getParent().requestFocus();
}
});
}

private void initMainLayout() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import de.tobias.playpad.pad.viewcontroller.IPadViewController
import de.tobias.playpad.util.Minifier
import de.tobias.playpad.view.PseudoClasses
import javafx.util.Duration
import org.apache.commons.lang3.StringUtils
import org.springframework.expression.ExpressionParser
import org.springframework.expression.common.TemplateParserContext
import org.springframework.expression.spel.standard.SpelExpressionParser
Expand All @@ -19,7 +18,7 @@ import scala.jdk.CollectionConverters._
class ModernCartDesignHandlerImpl extends ModernCartDesignHandler {

override def generateCss(design: ModernCartDesign, classSuffix: String, flat: Boolean): String = {
StringUtils.join(
String.join(
generateCss(design, flat, classSuffix, design.getBackgroundColor),
generateCss(design, flat, classSuffix, design.getPlayColor, s":${PseudoClasses.PLAY_CLASS.getPseudoClassName}"),
generateCss(design, flat, classSuffix, design.getBackgroundColor, s":${PseudoClasses.WARN_CLASS.getPseudoClassName}")
Expand All @@ -33,7 +32,7 @@ class ModernCartDesignHandlerImpl extends ModernCartDesignHandler {
val resource = ApplicationUtils.getApplication.getClasspathResource("style/modern-pad.css")
val string = Minifier minify resource.getAsString

val values: Map[String, Any] = Map(
val values: Map[String, AnyRef] = Map(
"prefix" -> padIdentifier,
"class" -> styleState,
"buttonColor" -> color.getButtonColor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import de.tobias.playpad.{DisplayableColor, PlayPadMain}
import javafx.scene.paint.Color
import javafx.stage.Stage
import javafx.util.Duration
import org.apache.commons.lang3.StringUtils
import org.springframework.expression.ExpressionParser
import org.springframework.expression.common.TemplateParserContext
import org.springframework.expression.spel.standard.SpelExpressionParser
Expand Down Expand Up @@ -64,7 +63,7 @@ class ModernGlobalDesignHandlerImpl extends ModernGlobalDesignHandler with Color
}

private def generateCss(design: ModernGlobalDesign): String = {
StringUtils.join(
String.join(
generateCss(design, design.getBackgroundColor),
generateCss(design, design.getPlayColor, s":${PseudoClasses.PLAY_CLASS.getPseudoClassName}"),
generateCss(design, design.getBackgroundColor, s":${PseudoClasses.WARN_CLASS.getPseudoClassName}")
Expand All @@ -78,7 +77,7 @@ class ModernGlobalDesignHandlerImpl extends ModernGlobalDesignHandler with Color
val resource = ApplicationUtils.getApplication.getClasspathResource("style/modern-global.css")
val string = Minifier minify resource.getAsString

val values: Map[String, Any] = Map(
val values: Map[String, AnyRef] = Map(
"class" -> styleState,
"buttonColor" -> color.getButtonColor,
"playbarTrackColor" -> color.getPlaybarColor,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package de.tobias.playpad.initialize

import de.thecodelabs.utils.application
import de.thecodelabs.utils.application.container.PathType
import de.thecodelabs.utils.util.Localization
import de.tobias.playpad.PlayPadImpl
import de.tobias.playpad.settings.GlobalSettings

class KeyboardDefaultMappingTask extends PlayPadInitializeTask {
override def name(): String = "Keyboard Mapping"

override def run(app: application.App, instance: PlayPadImpl): Unit = {
val globalSettingsPath = app.getPath(PathType.CONFIGURATION, GlobalSettings.FILE_NAME)
val globalSettings = instance.getGlobalSettings

globalSettings.getKeyCollection.loadDefaultFromFile("components/Keys.xml", Localization.getBundle)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ class ProfileLoadingTask extends PlayPadInitializeTask {
override def run(app: application.App, instance: PlayPadImpl): Unit = {
try ProfileReferenceManager.loadProfiles()
catch {
case e@(_: IOException | _: DocumentException) =>
Logger.error(e)
case e@(_: IOException | _: DocumentException) => Logger.error(e)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public class Project {
*/
final ProjectReference projectReference;

private transient IntegerProperty activePlayerProperty;
private transient IntegerProperty notFoundMediaProperty;
private transient ProjectUpdateListener syncListener;
private final transient IntegerProperty activePlayerProperty;
private final transient IntegerProperty notFoundMediaProperty;
private final transient ProjectUpdateListener syncListener;

public Project(ProjectReference ref) {
this.projectReference = ref;
Expand Down Expand Up @@ -136,7 +136,11 @@ public void removePad(UUID id) {

// Pages
public Page getPage(int position) {
if (position >= pages.size() && position < ProjectSettings.MAX_PAGES) {
if (position >= ProjectSettings.MAX_PAGES) {
return null;
}

while (position >= pages.size()) {
addPage(new Page(position, this));
}
return pages.get(position);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
package de.tobias.playpad.project;

import de.thecodelabs.storage.settings.annotation.Key;
import de.thecodelabs.utils.application.ApplicationUtils;

import java.nio.file.Path;

public class ProjectSettings {

public static final int MAX_PAGES = 10;
public static final int MAX_PAGES;

static {
Object maxPages = ApplicationUtils.getApplication().getUserDefaults().getData("MAX_PAGES");
if (maxPages != null) {
MAX_PAGES = Integer.parseInt(maxPages.toString());
} else {
MAX_PAGES = 10;
}
}

public static final int MAX_COLUMNS = 15;
public static final int MAX_ROWS = 15;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name: "AwakePlugin"
artifactId: "${pom.artifactId}"
groupId: "${pom.groupId}"
version: "${pom.version}"
build: 3
build: 5
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name: "EqualizerPlugin"
artifactId: "${pom.artifactId}"
groupId: "${pom.groupId}"
version: "${pom.version}"
build: 5
build: 6
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name: "LaunchpadPlugin"
artifactId: "${pom.artifactId}"
groupId: "${pom.groupId}"
version: "${pom.version}"
build: 4
build: 5
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name: "MediaPlugin"
artifactId: "${pom.artifactId}"
groupId: "${pom.groupId}"
version: "${pom.version}"
build: 8
build: 9
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name: "NativeAudio"
artifactId: "${pom.artifactId}"
groupId: "${pom.groupId}"
version: "${pom.version}"
build: 1
build: 2
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name: "PlayoutLogPlugin"
artifactId: "${pom.artifactId}"
groupId: "${pom.groupId}"
version: "${pom.version}"
build: 8
build: 9
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name: "WebApiPlugin"
artifactId: "${pom.artifactId}"
groupId: "${pom.groupId}"
version: "${pom.version}"
build: 1
build: 2
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<packaging>pom</packaging>

<properties>
<project.build.code>41</project.build.code>
<project.build.code>42</project.build.code>
<project.versionDate>${maven.build.timestamp}</project.versionDate>
<maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>

Expand All @@ -23,7 +23,7 @@

<jlibs.version>2.0.6</jlibs.version>
<libPlugins.version>2.2.1</libPlugins.version>
<versionizer-api.version>1.1.1</versionizer-api.version>
<versionizer-api.version>1.2.0</versionizer-api.version>

<jlayer.version>1.0.1</jlayer.version>

Expand Down

0 comments on commit 401b32c

Please sign in to comment.