Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New options dialog #173

Merged
merged 27 commits into from
Aug 16, 2019
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
59dae2c
Add new preference dialog
ArvidNy Jan 9, 2019
b57f8e1
Add custom preference storage manager
ArvidNy Jan 12, 2019
b052654
Add directory chooser and color picker preferences
ArvidNy Jan 13, 2019
c18e3e8
Improve directory chooser and color picker preferences
ArvidNy Jan 14, 2019
f7dd444
Add missing properties
ArvidNy Jan 14, 2019
a9de158
Move custom preferences
ArvidNy Jan 14, 2019
cbaa667
Test setting interface language
ArvidNy Jan 14, 2019
1c0862d
Fix notice slider options
ArvidNy Jan 14, 2019
4a25edf
Fix Bible ComboBox
ArvidNy Jan 15, 2019
7da61ff
Code cleanup
ArvidNy Jan 15, 2019
9f672e9
Add load test code
ArvidNy Jan 22, 2019
43bb467
Make the preference dialog parent of directory selectors
ArvidNy Jan 31, 2019
b56a68c
Code clean-up
ArvidNy Apr 1, 2019
b11b8ab
Merge branch 'master' into new-options-dialog
berry120 Apr 4, 2019
e3801fe
Threaded desktop fix
berry120 Apr 4, 2019
d2ced4d
Update PreferencesFX library
ArvidNy Aug 1, 2019
df47f50
Add category icons
ArvidNy Aug 5, 2019
45540ae
Set minimum options dialog size
ArvidNy Aug 5, 2019
36e2d12
Add missing general tab icon
ArvidNy Aug 10, 2019
25fa5f7
Merge branch 'master' into new-options-dialog
berry120 Aug 12, 2019
a9f0487
Code clean-up
ArvidNy Aug 14, 2019
216748a
Remove old code
ArvidNy Aug 14, 2019
74004ba
Add dark theme option
ArvidNy Aug 15, 2019
a16559c
Re-organize general tab into subcategories
ArvidNy Aug 15, 2019
cdad491
Group general panel settings
ArvidNy Aug 15, 2019
18a4876
Add missing song DB preview options
ArvidNy Aug 15, 2019
e1723de
Code cleanup
ArvidNy Aug 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 77 additions & 59 deletions Quelea/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ buildScan {
}

ext {
ArvidNy marked this conversation as resolved.
Show resolved Hide resolved
versionsuffix = System.properties["versionsuffix"]!=null ? System.properties["versionsuffix"] : project.queleaversion
CPInstallerName="quelea-" + versionsuffix + "-crossplatform-install.jar"
WindowsInstallerName="quelea-" + versionsuffix + "-x86-windows-install.exe"
WindowsInstaller64Name="quelea-" + versionsuffix + "-x64-windows-install.exe"
MacInstallerName="quelea-" + versionsuffix + "-mac.zip"
DebInstallerName ="quelea-" + versionsuffix + "-deb-install.deb"
CPInstaller ="dist/standalone/" + CPInstallerName
DebInstaller ="dist/standalone/" + DebInstallerName
WindowsInstaller="dist/standalone/" + ext.WindowsInstallerName
WindowsInstaller64="dist/standalone/" + ext.WindowsInstaller64Name
versionsuffix = System.properties["versionsuffix"] != null ? System.properties["versionsuffix"] : project.queleaversion

CPInstallerName = "quelea-" + versionsuffix + "-crossplatform-install.jar"
WindowsInstallerName = "quelea-" + versionsuffix + "-x86-windows-install.exe"
WindowsInstaller64Name = "quelea-" + versionsuffix + "-x64-windows-install.exe"
MacInstallerName = "quelea-" + versionsuffix + "-mac.zip"
DebInstallerName = "quelea-" + versionsuffix + "-deb-install.deb"

CPInstaller = "dist/standalone/" + CPInstallerName
DebInstaller = "dist/standalone/" + DebInstallerName
WindowsInstaller = "dist/standalone/" + ext.WindowsInstallerName
WindowsInstaller64 = "dist/standalone/" + ext.WindowsInstaller64Name
}

tasks.withType(JavaCompile) {
Expand All @@ -64,7 +64,7 @@ task createQueleaExe64(type: edu.sc.seis.launch4j.tasks.Launch4jLibraryTask) { /
icon = "../../icons/logo.ico"
copyright = "GPLv3"
bundledJrePath = "winjre64"
jvmOptions = ["-Dfile.encoding=UTF-8","-Dprism.dirtyopts=false","-Dglass.accessible.force=false"]
jvmOptions = ["-Dfile.encoding=UTF-8", "-Dprism.dirtyopts=false", "-Dglass.accessible.force=false"]
bundledJre64Bit = true
outfile = "Quelea64.exe"
}
Expand All @@ -83,42 +83,48 @@ task createQueleaExe64(type: edu.sc.seis.launch4j.tasks.Launch4jLibraryTask) { /

task copyToDist {
doLast {
copy {from configurations.runtime into project.distdir + "/lib"} //libraries
copy {from "themes" into project.distdir + "/themes"}
copy {from "icons" into project.distdir + "/icons"}
copy {from "bibles" into project.distdir + "/bibles"}
copy {from "server" into project.distdir + "/server"}
copy {from "vid" into project.distdir + "/vid"}
copy {from "vbs" into project.distdir + "/vbs"}
copy {from "licenses" into project.distdir + "/licenses"}
copy {from "languages" into project.distdir + "/languages"}
copy {from "dictionaries" into project.distdir + "/dictionaries"}
copy {from "img" into project.distdir + "/img"}
copy {from "timer" into project.distdir + "/timer"}
copy {from "src" into project.distdir + "/src"}
copy { from configurations.runtime into project.distdir + "/lib" } //libraries
copy { from "themes" into project.distdir + "/themes" }
copy { from "icons" into project.distdir + "/icons" }
copy { from "bibles" into project.distdir + "/bibles" }
copy { from "server" into project.distdir + "/server" }
copy { from "vid" into project.distdir + "/vid" }
copy { from "vbs" into project.distdir + "/vbs" }
copy { from "licenses" into project.distdir + "/licenses" }
copy { from "languages" into project.distdir + "/languages" }
copy { from "dictionaries" into project.distdir + "/dictionaries" }
copy { from "img" into project.distdir + "/img" }
copy { from "timer" into project.distdir + "/timer" }
copy { from "src" into project.distdir + "/src" }
// copy {from zipTree("bundlejre/winjre.zip") into project.distdir}
copy {from zipTree("bundlejre/winjre64.zip") into project.distdir}
copy {from file("build/libs/Quelea.jar") into file(project.distdir)}
copy {from file("README.TXT") into file(project.distdir)}
copy {from file("quelea.properties") into file(project.distdir)}
copy {from file("scheduleformat.xsl") into file(project.distdir)}
copy {from file("songformat.xsl") into file(project.distdir)}
copy {from file("fopcfg.xml") into file(project.distdir)}
copy {from file("Quelea.bat") into file(project.distdir)}
copy {from file("quelea.iss") into file(project.distdir)}
copy {from file("quelea64.iss") into file(project.distdir)}
copy {from file("build-install.bat") into file(project.distdir)}
copy {from file("build-install.sh") into file(project.distdir)}
copy {from file("licenses/gplv3.txt") into file(project.distdir) rename { String filename -> return "LICENSE.txt"}}
copy {from file("launch.sh") into file(project.distdir)}
copy {from file("licenses/copyright") into file(project.distdir + "/queleadoc")}
copy { from zipTree("bundlejre/winjre64.zip") into project.distdir }
copy { from file("build/libs/Quelea.jar") into file(project.distdir) }
copy { from file("README.TXT") into file(project.distdir) }
copy { from file("quelea.properties") into file(project.distdir) }
copy { from file("scheduleformat.xsl") into file(project.distdir) }
copy { from file("songformat.xsl") into file(project.distdir) }
copy { from file("fopcfg.xml") into file(project.distdir) }
copy { from file("Quelea.bat") into file(project.distdir) }
copy { from file("quelea.iss") into file(project.distdir) }
copy { from file("quelea64.iss") into file(project.distdir) }
copy { from file("build-install.bat") into file(project.distdir) }
copy { from file("build-install.sh") into file(project.distdir) }
copy {
from file("licenses/gplv3.txt") into file(project.distdir) rename { String filename -> return "LICENSE.txt" }
}
copy { from file("launch.sh") into file(project.distdir) }
copy { from file("licenses/copyright") into file(project.distdir + "/queleadoc") }
}
}

task grabNative {
doLast {
def f = project.file(project.distdir + '/lib/libAVPlayerJava.jnilib')
new URL('https://github.com/quelea-projection/libAVPlayerJava/releases/download/v1.0/libAVPlayerJava.jnilib').withInputStream{ i -> f.withOutputStream{ it << i }}
new URL('https://github.com/quelea-projection/libAVPlayerJava/releases/download/v1.0/libAVPlayerJava.jnilib').withInputStream { i ->
f.withOutputStream {
it << i
}
}
}
}
copyToDist.finalizedBy(grabNative)
Expand All @@ -129,7 +135,7 @@ izpack {
baseDir = file("dist")
}

task innosetup (type:Exec) {
task innosetup(type: Exec) {
doFirst {
workingDir = project.file('.')
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
Expand All @@ -138,17 +144,21 @@ task innosetup (type:Exec) {
commandLine = ['sh', './build-install.sh', project.queleaversion]
}
}

doLast {
copy {from file("Output/setup.exe") into file(project.distdir + "/standalone") rename { String filename -> return WindowsInstallerName}}
copy {from file("Output/setup64.exe") into file(project.distdir + "/standalone") rename { String filename -> return WindowsInstaller64Name}}
delete (file("Output"))
copy {
from file("Output/setup.exe") into file(project.distdir + "/standalone") rename { String filename -> return WindowsInstallerName }
}
copy {
from file("Output/setup64.exe") into file(project.distdir + "/standalone") rename { String filename -> return WindowsInstaller64Name }
}
delete(file("Output"))
}
}

task labelcheck(type:JavaExec) {
main = 'org.quelea.services.languages.LabelChecker'
classpath = sourceSets.main.runtimeClasspath
task labelcheck(type: JavaExec) {
main = 'org.quelea.services.languages.LabelChecker'
classpath = sourceSets.main.runtimeClasspath
}

task runPackr(type: JavaExec) {
Expand All @@ -160,11 +170,11 @@ task runPackr(type: JavaExec) {
task zipMacPackr(type: Zip) {
archiveName = MacInstallerName
destinationDir = file("dist/standalone")

from "out-mac"

doLast {
delete (file("out-mac"))
delete(file("out-mac"))
}
}

Expand All @@ -178,7 +188,7 @@ build.finalizedBy(dist)

dependencies {
izpack 'org.codehaus.izpack:izpack-standalone-compiler:4.3.5'

compile 'com.googlecode.paradoxdriver:paradoxdriver:1.4.0'
compile 'com.github.berry120.jopenlyrics:jopenlyrics:2.0'
compile group: 'org.hsqldb', name: 'hsqldb', version: '2.4.1'
Expand Down Expand Up @@ -222,20 +232,28 @@ dependencies {

compile group: 'org.jflac', name: 'jflac-codec', version: '1.5.2'
compile group: 'org.jcraft', name: 'jorbis', version: '0.0.17'

compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.0'
compile group: 'com.sun.xml.bind', name: 'jaxb-core', version: '2.3.0.1'
compile group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '2.3.0'
compile group: 'javax.activation', name: 'activation', version: '1.1.1'


compile group: 'com.dlsc.preferencesfx', name: 'preferencesfx-core', version: '8.3.2'

testCompile group: 'junit', name: 'junit', version: '4.12'
}

repositories {
maven {
url "http://maven.bestsolution.at/efxclipse-releases"
}
}

jar {
manifest {
attributes (
'Main-Class': 'org.quelea.windows.main.Main',
"Class-Path": configurations.compile.collect { "lib/" + it.getName() }.join(' ')
attributes(
'Main-Class': 'org.quelea.windows.main.Main',
"Class-Path": configurations.compile.collect { "lib/" + it.getName() }.join(' ')
)
}
}
Expand Down
12 changes: 12 additions & 0 deletions Quelea/languages/gb.lang
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,10 @@ video.loop.tooltip=Toggle looping on / off
allow.item.theme.override.global=Allow custom item themes to override global theme
song.default.theme.label=Song default
bible.default.theme.label=Bible default
small.song.position.label=Song information position
small.bible.position.label=Bible information position
small.bible.size.label=Bible information size
small.song.size.label=Song information size
interface.theme.label=Application theme
default.theme.label=Default
dark.theme.label=Dark
Expand All @@ -694,3 +698,11 @@ db.song.preview.label=Database song preview
db.song.preview.label.control=None
db.song.preview.label.databasepreview=In database pane
db.song.preview.label.previewpane=In preview pane
mobile.remote.heading=Mobile Remote
interface.options.options=Interface Options
general.interface.options=General Interface Options
small.song.text.options=Small Song Text Options
small.bible.text.options=Small Bible Text Options
general.user.options=General User Options
theme.options=Theme Options
schedule.options=Schedule Options
8 changes: 8 additions & 0 deletions Quelea/src/main/java/org/quelea/data/bible/BibleManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ public Bible[] getBibles() {
return bibles.toArray(new Bible[bibles.size()]);
}

public Bible getBibleFromName(String name) {
for (Bible b : bibles) {
if (b.getName().equals(name))
return b;
}
return null;
}

/**
* Get the underlying search index used by this bible manager.
* <p/>
Expand Down
4 changes: 2 additions & 2 deletions Quelea/src/main/java/org/quelea/server/AutoDetectServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ private class RootHandler implements HttpHandler {
@Override
public void handle(HttpExchange t) throws IOException {
String response;
response = "" + QueleaApp.get().getMainWindow().getOptionsDialog().getServerSettingsPanel().getMLURL() + "\n";
response = response + QueleaApp.get().getMainWindow().getOptionsDialog().getServerSettingsPanel().getRCURL();
response = "" + QueleaApp.get().getMainWindow().getPreferencesDialog().getOptionsServerSettingsPanel().getLyricsPreference().getMLURL() + "\n";
response = response + QueleaApp.get().getMainWindow().getPreferencesDialog().getOptionsServerSettingsPanel().getRemotePreference().getRCURL();
t.sendResponseHeaders(200, response.length());
try (OutputStream os = t.getResponseBody()) {
os.write(response.getBytes());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of Quelea, free projection software for churches.
*
*
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by * the Free
Expand Down Expand Up @@ -119,17 +119,30 @@ public String getLabel(String key) {
}
return ret;
}


public String getEngKey(String label) {
if (english)
ArvidNy marked this conversation as resolved.
Show resolved Hide resolved
return label;
int pos = 0;
for (String s : labels.stringPropertyNames()) {
if (getLabel(s).toLowerCase().equals(label.toLowerCase())) {
return engLabels.get(labels.keySet().toArray()[pos]).toString();
}
pos++;
}
return null;
}

@Override
public Enumeration<String> getKeys() {
return Collections.enumeration(keySet());
}

@Override
public Object handleGetObject(String key) {
return getLabel(key);
}

// Overrides handleKeySet() so that the getKeys() implementation
// can rely on the keySet() value.
@Override
Expand Down
Loading