Improved layout for prefs

This commit is contained in:
2019-06-13 06:22:27 -07:00
parent 9177354f58
commit 94ceb18cff

View File

@@ -40,52 +40,46 @@ function makeWindowString($p, $strings) {
stat_mode.type = popup
stat_mode.label = POSIX stat()
stat_mode.option = ".$strings[3][0]."
stat_mode.option = ".$strings[3][1]."
stat_mode.option = ".$strings[3][2]."
stat_mode.option = ".$strings[3][3]."
stat_mode.default = ".$strings[3][$p['stat_mode']]."
stat_mode.width = 190
stat_mode.option = ".$strings[1][0]."
stat_mode.option = ".$strings[1][1]."
stat_mode.option = ".$strings[1][2]."
stat_mode.option = ".$strings[1][3]."
stat_mode.default = ".$strings[1][$p['stat_mode']]."
stat_mode.width = 380
readability.type = checkbox
readability.label = Abort on read errors
readability.default = ".$p['readability']."
readability.x = 200
readability.y = 291
profile.type = checkbox
profile.label = Attach system profile
profile.default = ".$p['profile']."
profile.x = 200
profile.y = 314
hr2.type = image
hr2.path = ".__DIR__."/hr.png"."
hr2.width = 380
hr2.height = 2
spotlight.type = checkbox
spotlight.label = Spotlight
spotlight.default = ".$p['spotlight']."
meta.type = checkbox
meta.label = Collect external metadata
meta.default = ".$p['meta']."
meta.x = 200
meta.y = 227
thumbs.type = popup
thumbs.label = Thumbnails
thumbs.option = ".$strings[1][0]."
thumbs.option = ".$strings[1][1]."
thumbs.option = ".$strings[1][2]."
thumbs.default = ".$strings[1][$p['thumbs']]."
thumbs.option = ".$strings[2][0]."
thumbs.option = ".$strings[2][1]."
thumbs.option = ".$strings[2][2]."
thumbs.default = ".$strings[2][$p['thumbs']]."
thumbs.width = 120
thumb_priority.type = popup
thumb_priority.label = Priority
thumb_priority.option = ".$strings[2][0]."
thumb_priority.option = ".$strings[2][1]."
thumb_priority.option = ".$strings[2][2]."
thumb_priority.option = ".$strings[2][3]."
thumb_priority.default = ".$strings[2][$p['thumb_priority']]."
thumb_priority.option = ".$strings[3][0]."
thumb_priority.option = ".$strings[3][1]."
thumb_priority.option = ".$strings[3][2]."
thumb_priority.default = ".$strings[3][$p['thumb_priority']]."
thumb_priority.width = 120
thumb_priority.x = 150
thumb_priority.y = 162
thumb_priority.y = 227
thumb_size.type = textfield
thumb_size.default = ".$p['thumb_size']."
@@ -93,7 +87,32 @@ function makeWindowString($p, $strings) {
thumb_size.placeholder = pixels
thumb_size.width = 60
thumb_size.x = 300
thumb_size.y = 165
thumb_size.y = 230
icons.type = popup
icons.label = Icons
icons.option = ".$strings[2][0]."
icons.option = ".$strings[2][1]."
icons.option = ".$strings[2][2]."
icons.default = ".$strings[2][$p['icons']]."
icons.width = 120
icon_tool.type = popup
icon_tool.label = Tool
icon_tool.option = ".$strings[4][0]."
icon_tool.option = ".$strings[4][1]."
icon_tool.default = ".$strings[4][$p['icon_tool']]."
icon_tool.width = 120
icon_tool.x = 150
icon_tool.y = 162
icon_size.type = textfield
icon_size.default = ".$p['icon_size']."
icon_size.label = Size
icon_size.placeholder = pixels
icon_size.width = 60
icon_size.x = 300
icon_size.y = 165
hash.type = checkbox
hash.label = Generate hashes
@@ -102,7 +121,7 @@ function makeWindowString($p, $strings) {
hash_label.type = text
hash_label.default = Limit
hash_label.x = 200
hash_label.y = 128
hash_label.y = 126
hash_label.width = 40
hash_limit.type = textfield
@@ -110,7 +129,7 @@ function makeWindowString($p, $strings) {
hash_limit.tooltip = Don't hash files larger than X GB
hash_limit.width = 60
hash_limit.x = 240
hash_limit.y = 125
hash_limit.y = 123
hash_label_after.type = text
hash_label_after.default = GB
@@ -141,9 +160,15 @@ function makeWindowString($p, $strings) {
contents_label_after.y = 88
contents_label_after.width = 40
profile.type = checkbox
profile.label = Attach system profile
profile.default = ".$p['profile']."
spotlight.type = checkbox
spotlight.label = Use spotlight
spotlight.default = ".$p['spotlight']."
meta.type = checkbox
meta.label = Collect external metadata
meta.default = ".$p['meta']."
meta.x = 200
meta.y = 48
cb.type = cancelbutton
db.type = defaultbutton
@@ -166,9 +191,10 @@ if(!$p['bdest']) {
// Load strings
$strings[] = array("Do nothing","Reveal result in Finder","Upload result with rsync");
$strings[] = array("Bypass","Generate","Rebuild");
$strings[] = array("external","ql-thumbnail","qltool","qlmanage");
$strings[] = array("Bypass","Collect","Collect & verify","Collect & repair atimes");
$strings[] = array("Skip","Collect","Collect & verify","Collect & repair atimes");
$strings[] = array("Skip","Generate","Rebuild");
$strings[] = array("external","ql-thumbnail","qlmanage");
$strings[] = array("qltool","qlmanage");
// Launch Pashua and parse results
@@ -193,9 +219,11 @@ if (@$result['cb']) {
// Fix strings
$result['postflight'] = array_search($result['postflight'],$strings[0]);
$result['thumbs'] = array_search($result['thumbs'],$strings[1]);
$result['thumb_priority'] = array_search($result['thumb_priority'],$strings[2]);
$result['stat_mode'] = array_search($result['stat_mode'],$strings[3]);
$result['stat_mode'] = array_search($result['stat_mode'],$strings[1]);
$result['thumbs'] = array_search($result['thumbs'],$strings[2]);
$result['thumb_priority'] = array_search($result['thumb_priority'],$strings[3]);
$result['icons'] = array_search($result['icons'],$strings[2]);
$result['icon_tool'] = array_search($result['icon_tool'],$strings[4]);
// If the user didn't specify a destpath, set to default