Skip to content

Commit 487464e

Browse files
authored
Merge pull request #115 from CodeDead/release/v1.3.0
Release/v1.3.0
2 parents a5f3650 + a7145b9 commit 487464e

25 files changed

+122
-52
lines changed

.github/workflows/release.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
if: ${{ matrix.os == 'ubuntu-latest' }}
2424
run: sudo apt-get install -y fuse libfuse2
2525

26-
- name: Set up JDK 20
26+
- name: Set up JDK 21
2727
uses: actions/setup-java@v3
2828
with:
29-
java-version: '20.0.1'
29+
java-version: '21'
3030
distribution: 'temurin'
3131

3232
- name: Build
@@ -66,10 +66,10 @@ jobs:
6666
if: ${{ matrix.os == 'ubuntu-latest' }}
6767
run: sudo apt-get install -y fuse libfuse2
6868

69-
- name: Set up JDK 20
69+
- name: Set up JDK 21
7070
uses: actions/setup-java@v3
7171
with:
72-
java-version: '20.0.1'
72+
java-version: '21'
7373
distribution: 'temurin'
7474

7575
- name: Switch portable flag (Linux)

.github/workflows/test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
if: ${{ matrix.os == 'ubuntu-latest' }}
2424
run: sudo apt-get install -y fuse libfuse2
2525

26-
- name: Set up JDK 20
26+
- name: Set up JDK 21
2727
uses: actions/setup-java@v3
2828
with:
29-
java-version: '20.0.1'
29+
java-version: '21'
3030
distribution: 'temurin'
3131

3232
- name: Test

build.gradle

+16-18
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ plugins {
55
id 'idea'
66
id 'eclipse'
77
id 'application'
8-
id 'org.beryx.jlink' version '2.26.0'
9-
id 'org.openjfx.javafxplugin' version '0.0.14'
8+
id 'org.beryx.jlink' version '3.0.0'
9+
id 'org.openjfx.javafxplugin' version '0.1.0'
1010
}
1111

1212
group 'com.codedead'
13-
version '1.2.0'
13+
version '1.3.0'
1414

1515
def currentOS = DefaultNativePlatform.currentOperatingSystem
1616

1717
java {
18-
targetCompatibility = JavaVersion.VERSION_20
19-
sourceCompatibility = JavaVersion.VERSION_20
18+
targetCompatibility = JavaVersion.VERSION_21
19+
sourceCompatibility = JavaVersion.VERSION_21
2020
}
2121

2222
application {
@@ -25,13 +25,13 @@ application {
2525
}
2626

2727
javafx {
28-
version = '20.0.1'
28+
version = '21.0.1'
2929
configuration = 'implementation'
3030
modules = ['javafx.base', 'javafx.controls', 'javafx.fxml', 'javafx.media']
3131
}
3232

3333
jlink {
34-
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
34+
options = ['--strip-debug', '--compress', 'zip-9', '--no-header-files', '--no-man-pages']
3535
forceMerge('log4j-api', 'jackson')
3636
launcher {
3737
name = 'Opal'
@@ -40,8 +40,6 @@ jlink {
4040
mergedModule {
4141
additive = true
4242
uses 'org.apache.logging.log4j.util.PropertySource'
43-
uses 'org.apache.logging.log4j.core.util.ContextDataProvider'
44-
uses 'org.apache.logging.log4j.core.util.WatchEventService'
4543
uses 'org.apache.logging.log4j.spi.Provider'
4644
uses 'org.apache.logging.log4j.message.ThreadDumpMessage.ThreadInfoFactory'
4745
}
@@ -105,20 +103,20 @@ tasks.register('AppImage') {
105103
doLast {
106104
copy {
107105
from '.AppImage/.AppDir'
108-
into "${buildDir}/AppImage/Opal.AppDir"
106+
into layout.buildDirectory.dir("AppImage/Opal.AppDir")
109107
}
110108
copy {
111-
from "${buildDir}/jpackage/Opal/"
112-
into "${buildDir}/AppImage/Opal.AppDir/usr/"
109+
from layout.buildDirectory.dir("jpackage/Opal/")
110+
into layout.buildDirectory.dir("AppImage/Opal.AppDir/usr/")
113111
}
114112
copy {
115113
from '.AppImage/.AppDir/Opal.png'
116-
into "${buildDir}/AppImage/Opal.AppDir/usr/lib"
114+
into layout.buildDirectory.dir("AppImage/Opal.AppDir/usr/lib")
117115
}
118116
exec {
119117
commandLine 'sh', "${project.rootDir}/.AppImage/createAppImage.sh", "${project.version.toString()}"
120118
}
121-
delete "${buildDir}/AppImage/Opal.AppDir"
119+
delete layout.buildDirectory.dir("AppImage/Opal.AppDir")
122120
}
123121
}
124122

@@ -142,11 +140,11 @@ repositories {
142140
}
143141

144142
dependencies {
145-
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
143+
implementation 'org.apache.logging.log4j:log4j-core:2.21.1'
146144
implementation 'io.github.mkpaz:atlantafx-base:2.0.1'
147-
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
148-
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
149-
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.3'
145+
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.3'
146+
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0'
147+
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.0'
150148
}
151149

152150
tasks.named('test') {

gradle/wrapper/gradle-wrapper.jar

346 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

+9-8
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ done
8383
# This is normally unused
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
8788

8889
# Use the maximum available, or set MAX_FD != -1 to use that value.
8990
MAX_FD=maximum
@@ -144,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
146147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
148149
MAX_FD=$( ulimit -H -n ) ||
149150
warn "Could not query maximum file descriptor limit"
150151
esac
151152
case $MAX_FD in #(
152153
'' | soft) :;; #(
153154
*)
154155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
156157
ulimit -n "$MAX_FD" ||
157158
warn "Could not set maximum file descriptor limit to $MAX_FD"
158159
esac
@@ -201,11 +202,11 @@ fi
201202
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202203
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203204

204-
# Collect all arguments for the java command;
205-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
206-
# shell script including quotes and variable substitutions, so put them in
207-
# double quotes to make sure that they get re-expanded; and
208-
# * put everything else in single quotes, so that it's not re-expanded.
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
209210

210211
set -- \
211212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

src/main/java/com/codedead/opal/controller/MainWindowController.java

+20
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,22 @@ private void saveSoundPresetAction() {
364364
}
365365
}
366366

367+
/**
368+
* Play or pause all media
369+
*/
370+
@FXML
371+
private void playPauseAction() {
372+
logger.info("Play / pause all media");
373+
try {
374+
for (final SoundPane soundPane : getAllSoundPanes(grpControls)) {
375+
soundPane.playPause();
376+
}
377+
} catch (final MediaPlayerException ex) {
378+
logger.error("Unable to play / pause MediaPlayer", ex);
379+
FxUtils.showErrorAlert(translationBundle.getString("PlayPauseError"), ex.toString(), getClass().getResourceAsStream(SharedVariables.ICON_URL));
380+
}
381+
}
382+
367383
/**
368384
* Method that is called when all players should be reset
369385
*/
@@ -408,6 +424,8 @@ private void settingsAction() {
408424

409425
logger.info("Showing the SettingsWindow");
410426
primaryStage.show();
427+
primaryStage.setWidth(450);
428+
primaryStage.setHeight(320);
411429
} catch (final IOException ex) {
412430
logger.error("Unable to open the SettingsWindow", ex);
413431
FxUtils.showErrorAlert(translationBundle.getString("SettingsWindowError"), ex.toString(), getClass().getResourceAsStream(SharedVariables.ICON_URL));
@@ -491,6 +509,8 @@ private void aboutAction() {
491509

492510
logger.info("Showing the AboutWindow");
493511
primaryStage.show();
512+
primaryStage.setWidth(450);
513+
primaryStage.setHeight(250);
494514
} catch (final IOException ex) {
495515
logger.error("Unable to open the AboutWindow", ex);
496516
FxUtils.showErrorAlert(translationBundle.getString("AboutWindowError"), ex.toString(), getClass().getResourceAsStream(SharedVariables.ICON_URL));

src/main/java/com/codedead/opal/domain/SoundPane.java

+2-8
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,6 @@ private void initializeMediaPlayer(final String value) throws URISyntaxException
9292
disposeMediaPlayer();
9393

9494
mediaPlayer = new MediaPlayer(new Media(Objects.requireNonNull(getClass().getResource(value)).toURI().toString()));
95-
mediaPlayer.currentTimeProperty().addListener((observableValue, oldDuration, newDuration) -> {
96-
// Quality of life improvement to reduce audio lag when restarting the media
97-
if (mediaPlayer != null && newDuration.toSeconds() >= mediaPlayer.getMedia().getDuration().toSeconds() - 0.5) {
98-
mediaPlayer.seek(Duration.ZERO);
99-
}
100-
});
10195
mediaPlayer.setOnEndOfMedia(() -> {
10296
if (mediaPlayer != null) {
10397
mediaPlayer.seek(Duration.ZERO);
@@ -275,10 +269,10 @@ public void pause() {
275269
* @throws MediaPlayerException When the {@link MediaPlayer} object could not be initialized
276270
*/
277271
@FXML
278-
private void playPause() throws MediaPlayerException {
272+
public void playPause() throws MediaPlayerException {
279273
if (mediaPlayer != null && mediaPlayer.getStatus() == MediaPlayer.Status.PLAYING) {
280274
pause();
281-
} else {
275+
} else if (mediaPlayer != null && mediaPlayer.getVolume() != 0) {
282276
play();
283277
}
284278
}

src/main/java/com/codedead/opal/utils/SharedVariables.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
public final class SharedVariables {
44

55
public static final String ICON_URL = "/images/opal.png";
6-
public static final String CURRENT_VERSION = "1.2.0.0";
6+
public static final String CURRENT_VERSION = "1.3.0.0";
77
public static final boolean PORTABLE = false;
88
public static final String DEFAULT_LOCALE = "en-US";
99

src/main/java/module-info.java

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
requires javafx.controls;
44
requires javafx.fxml;
55
requires java.desktop;
6+
requires java.compiler;
7+
requires java.naming;
68
requires javafx.media;
79
//noinspection Java9RedundantRequiresStatement
810
requires jdk.crypto.ec; // Added for SSL handshakes
1.6 MB
Binary file not shown.
1.59 MB
Binary file not shown.
839 Bytes
Loading
643 Bytes
Loading

src/main/resources/translations/OpalApplication.properties

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
About=About
2-
AboutText=Opal was created by DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nTheme: AtlantaFX\nVersion: 1.2.0\n\nCopyright © 2023 CodeDead
2+
AboutText=Opal was created by DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nTheme: AtlantaFX\nVersion: 1.3.0\n\nCopyright © 2023 CodeDead
33
AboutWindowError=Unable to open the About Window!
44
AboutWindowTitle=Opal - About
55
AutoUpdate=Automatically check for updates
@@ -94,3 +94,7 @@ AudioBalance=Audio balance
9494
Advanced=Advanced
9595
Seagulls=Seagulls
9696
Belltower=Bell tower
97+
SlowMetronome=Metronome (slow)
98+
FastMetronome=Metronome (fast)
99+
PlayPause=Play / Pause
100+
PlayPauseError=Unable to play / pause!

src/main/resources/translations/OpalApplication_de_DE.properties

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
About=Über
2-
AboutText=Opal wurde erstellt von: DeadLine\n\nAudio: ZapSplat.com\nBilder: Remix Icon\nDesign: AtlantaFX\nÜbersetzung: github.com/uDEV2019\nVersion: 1.2.0\n\nCopyright © 2023 CodeDead
2+
AboutText=Opal wurde erstellt von: DeadLine\n\nAudio: ZapSplat.com\nBilder: Remix Icon\nDesign: AtlantaFX\nÜbersetzung: github.com/uDEV2019\nVersion: 1.3.0\n\nCopyright © 2023 CodeDead
33
AboutWindowError=Über-Dialog konnte nicht geöffnet werden!
44
AboutWindowTitle=Opal - Über
55
AutoUpdate=Automatisch auf Aktualisierungen prüfen
@@ -94,3 +94,7 @@ AudioBalance=Audiobalance
9494
Advanced=Erweitert
9595
Seagulls=Möwen
9696
Belltower=Glockenturm
97+
SlowMetronome=Langsames Metronom
98+
FastMetronome=Schnelles Metronom
99+
PlayPause=Abspielen / Pause
100+
PlayPauseError=Abspielen / Pause konnte nicht ausgeführt werden!

src/main/resources/translations/OpalApplication_en_US.properties

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
About=About
2-
AboutText=Opal was created by DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nTheme: AtlantaFX\nVersion: 1.2.0\n\nCopyright © 2023 CodeDead
2+
AboutText=Opal was created by DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nTheme: AtlantaFX\nVersion: 1.3.0\n\nCopyright © 2023 CodeDead
33
AboutWindowError=Unable to open the About Window!
44
AboutWindowTitle=Opal - About
55
AutoUpdate=Automatically check for updates
@@ -94,3 +94,7 @@ AudioBalance=Audio balance
9494
Advanced=Advanced
9595
Seagulls=Seagulls
9696
Belltower=Bell tower
97+
SlowMetronome=Metronome (slow)
98+
FastMetronome=Metronome (fast)
99+
PlayPause=Play / Pause
100+
PlayPauseError=Unable to play / pause!

src/main/resources/translations/OpalApplication_es_ES.properties

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
About=Acerca de
2-
AboutText=Opal fue creado por DeadLine\n\nAudio: ZapSplat.com\nImágenes: Remix Icon\nTema: AtlantaFX\nVersión: 1.2.0\n\nCopyright © 2023 CodeDead
2+
AboutText=Opal fue creado por DeadLine\n\nAudio: ZapSplat.com\nImágenes: Remix Icon\nTema: AtlantaFX\nVersión: 1.3.0\n\nCopyright © 2023 CodeDead
33
AboutWindowError=¡No se puede abrir la ventana Acerca de!
44
AboutWindowTitle=Opal - Acerca de
55
AutoUpdate=Buscar actualizaciones automáticamente
@@ -94,3 +94,7 @@ AudioBalance=Balance de audio
9494
Advanced=Avanzado
9595
Seagulls=Gaviotas
9696
Belltower=Campanario
97+
SlowMetronome=Metronomo lento
98+
FastMetronome=Metronomo rápido
99+
PlayPause=Reproducir / Pausa
100+
PlayPauseError=¡No se puede reproducir / pausar el sonido!

src/main/resources/translations/OpalApplication_fr_FR.properties

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
About=À propos
2-
AboutText=Opal a été créé par DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nThème: AtlantaFX\nVersion: 1.2.0\n\nCopyright © 2023 CodeDead
2+
AboutText=Opal a été créé par DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nThème: AtlantaFX\nVersion: 1.3.0\n\nCopyright © 2023 CodeDead
33
AboutWindowError=Impossible d'ouvrir la fenêtre À propos!
44
AboutWindowTitle=Opal - À propos
55
AutoUpdate=Rechercher automatiquement les mises à jour
@@ -94,3 +94,7 @@ AudioBalance=Balance audio
9494
Advanced=Avancé
9595
Seagulls=Mouettes
9696
Belltower=Clocher
97+
SlowMetronome=Métronome lent
98+
FastMetronome=Métronome rapide
99+
PlayPause=Lecture / Pause
100+
PlayPauseError=Impossible de lire / mettre en pause!

src/main/resources/translations/OpalApplication_jp_JP.properties

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
About=このアプリについて
2-
AboutText=Opal は DeadLine によって作成されました\n\nオーディオ: ZapSplat.com\n画像: リミックス アイコン\nテーマ: AtlantaFX\nバージョン: 1.2.0\n\nCopyright © 2023 CodeDead
2+
AboutText=Opal は DeadLine によって作成されました\n\nオーディオ: ZapSplat.com\n画像: リミックス アイコン\nテーマ: AtlantaFX\nバージョン: 1.3.0\n\nCopyright © 2023 CodeDead
33
AboutWindowError=バージョン情報ウィンドウを開けません!
44
AboutWindowTitle=Opal - このアプリについて
55
AutoUpdate=アップデートを自動的に確認する
@@ -94,3 +94,7 @@ AudioBalance=オーディオ バランス
9494
Advanced=高度な設定
9595
Seagulls=カモメ
9696
Belltower=ベルタワー
97+
SlowMetronome=遅いメトロノーム
98+
FastMetronome=速いメトロノーム
99+
PlayPause=再生/一時停止
100+
PlayPauseError=再生/一時停止できません!

src/main/resources/translations/OpalApplication_nl_NL.properties

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
About=Over
2-
AboutText=Opal is gemaakt door DeadLine\n\nAudio: ZapSplat.com\nAfbeeldingen: Remix Icon\nThema: AtlantaFX\nVersie: 1.2.0\n\nCopyright © 2023 CodeDead
2+
AboutText=Opal is gemaakt door DeadLine\n\nAudio: ZapSplat.com\nAfbeeldingen: Remix Icon\nThema: AtlantaFX\nVersie: 1.3.0\n\nCopyright © 2023 CodeDead
33
AboutWindowError=Kan het Over venster niet openen!
44
AboutWindowTitle=Opal - Over
55
AutoUpdate=Automatisch controleren op updates
@@ -94,3 +94,7 @@ AudioBalance=Audio balans
9494
Advanced=Geavanceerd
9595
Seagulls=Meeuwen
9696
Belltower=Klokkentoren
97+
SlowMetronome=Metronoom (langzaam)
98+
FastMetronome=Metronoom (snel)
99+
PlayPause=Afspelen / Pauzeren
100+
PlayPauseError=Kan niet afspelen / pauzeren!

src/main/resources/translations/OpalApplication_ru_RU.properties

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
About
2-
AboutText=Opal был создан DeadLine\n\nАудио: ZapSplat.com\nИзображения: Remix Icon\nТема: AtlantaFX\nВерсия: 1.2.0\n\nАвторские права © 2023 CodeDead
2+
AboutText=Opal был создан DeadLine\n\nАудио: ZapSplat.com\nИзображения: Remix Icon\nТема: AtlantaFX\nВерсия: 1.3.0\n\nАвторские права © 2023 CodeDead
33
AboutWindowError=Не удается открыть окно «О программе»!
44
AboutWindowTitle=Opal - О компании
55
AutoUpdate=Автоматически проверять наличие обновлений
@@ -94,3 +94,7 @@ AudioBalance=Баланс аудио
9494
Advanced=Дополнительно
9595
Seagulls=Чайки
9696
Belltower=Колокольня
97+
SlowMetronome=Медленный метроном
98+
FastMetronome=Быстрый метроном
99+
PlayPause=Воспроизведение / Пауза
100+
PlayPauseError=Невозможно воспроизвести / приостановить воспроизведение!

0 commit comments

Comments
 (0)