Desktop: size the folder picker dialog (tiny on HiDPI/XWayland) + log pump failures
JFileChooser came up with an unusable size under the compositor; pin 1040x700. transcribeFile now appends its exception to ~/.config/shonar-desktop/pump-error.log instead of returning false silently. Verified live: library lists 49 m4a files from ~/Music/Recordings, existing .transcript.md reports detected as done.
This commit is contained in:
parent
535a96a1f0
commit
3241bd50cf
2 changed files with 9 additions and 0 deletions
|
|
@ -542,6 +542,12 @@ class DesktopState(private val appDir: File = defaultAppDir()) {
|
|||
saveReport(DetailUi(file = f, transcript = transcript, summary = summary))
|
||||
true
|
||||
} catch (e: Exception) {
|
||||
// Surface pump failures for diagnosis instead of swallowing them.
|
||||
runCatching {
|
||||
File(appDir, "pump-error.log").appendText(
|
||||
"${java.time.Instant.now()} ${f.name}: $e\n",
|
||||
)
|
||||
}
|
||||
false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,6 +75,9 @@ private fun chooseFolder(): File? {
|
|||
dialogTitle = "Choose your recordings folder"
|
||||
fileSelectionMode = JFileChooser.DIRECTORIES_ONLY
|
||||
isAcceptAllFileFilterUsed = false
|
||||
// Without an explicit size the dialog comes up tiny on HiDPI
|
||||
// compositors (and there is no resize handle), so pin a usable one.
|
||||
preferredSize = java.awt.Dimension(1040, 700)
|
||||
}
|
||||
return if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) chooser.selectedFile else null
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue