UI options panel

This commit is contained in:
Zlatin Balevsky
2019-06-14 12:51:27 +01:00
parent 0b4f261bc1
commit f8f7cfe836
5 changed files with 83 additions and 3 deletions

View File

@@ -5,19 +5,27 @@ class UISettings {
String lnf
boolean showMonitor
String font
boolean clearCancelledDownloads
boolean clearFinishedDownloads
UISettings(Properties props) {
lnf = props.getProperty("lnf", "system")
showMonitor = Boolean.parseBoolean(props.getProperty("showMonitor", "true"))
font = props.getProperty("font",null)
clearCancelledDownloads = Boolean.parseBoolean(props.getProperty("clearCancelledDownloads","false"))
clearFinishedDownloads = Boolean.parseBoolean(props.getProperty("clearFinishedDownloads","false"))
}
void write(OutputStream out) throws IOException {
Properties props = new Properties()
props.setProperty("lnf", lnf)
props.setProperty("showMonitor", showMonitor)
props.setProperty("showMonitor", String.valueOf(showMonitor))
props.setProperty("clearCancelledDownloads", String.valueOf(clearCancelledDownloads))
props.setProperty("clearFinishedDownloads", String.valueOf(clearFinishedDownloads))
if (font != null)
props.setProperty("font", font)
props.store(out, "UI Properties")
}
}

View File

@@ -0,0 +1,7 @@
<html>
Some html goes here
<ul>
<li>1</li>
<li>2</li>
</ul>
</html>