Update localization and add preference to show the open panel at launch.

This commit is contained in:
Damiano Galassi committed 2020-02-13 11:47:49 +01:00
1 parent d5f6e1a642
commit 1363c6587d
6 files changed
+50 -35

No files matched your search

+3 -1
View File
@@ -224,7 +224,9 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
}
func applicationShouldOpenUntitledFile(_ sender: NSApplication) -> Bool {
documentController.openDocument(self)
if Prefs.showOpenPanelAtLaunch {
documentController.openDocument(self)
}
return false
}
+4 -1
View File
@@ -73,7 +73,7 @@ struct StoredCodable<T: Codable> : Registable {
enum Prefs {
static func register() {
ud.register(defaults: [_crashOnException, _saveFormat, _organizeAlternateGroups, _defaultSaveFormat,
ud.register(defaults: [_crashOnException, _showOpenPanelAtLaunch, _saveFormat, _organizeAlternateGroups, _defaultSaveFormat,
_organizeAlternateGroups, _inferMediaCharacteristics, _audioMixdown,
_audioBitrate, _audioDRC, _audioConvertAC3, _audioKeepAC3, _audioConvertDts,
_audioDtsOptions, _subtitleConvertBitmap, _ratingsCountry, _chaptersPreviewPosition,
@@ -83,6 +83,9 @@ enum Prefs {
@Stored(key: "NSApplicationCrashOnException", defaultValue: true)
private static var crashOnException: Bool
@Stored(key: "SBShowOpenPanelAtLaunch", defaultValue: true)
static var showOpenPanelAtLaunch: Bool
@Stored(key: "SBIgnoreDonationAlert", defaultValue: false)
static var suppressDonationAlert: Bool