Added option for displayed number of search results
This commit is contained in:
committed by
Kim Wittenburg
parent
24bb68f7d8
commit
548214479a
@@ -36,6 +36,8 @@ import Cocoa
|
||||
|
||||
static let keepSearchResultsKey = "Keep Search Results"
|
||||
|
||||
static let numberOfSearchResultsKey = "Number of Search Results"
|
||||
|
||||
static let removeSavedAlbumsKey = "Remove Saved Albums"
|
||||
|
||||
static let useLowResolutionArtworkKey = "Use Low Resolution Artwork"
|
||||
@@ -76,6 +78,7 @@ import Cocoa
|
||||
UserDefaultsConstants.saveArtworkKey: false,
|
||||
UserDefaultsConstants.overwriteExistingFilesKey: false,
|
||||
UserDefaultsConstants.keepSearchResultsKey: false,
|
||||
UserDefaultsConstants.numberOfSearchResultsKey: 10,
|
||||
UserDefaultsConstants.removeSavedAlbumsKey: false,
|
||||
UserDefaultsConstants.useLowResolutionArtworkKey: false,
|
||||
UserDefaultsConstants.useCensoredNamesKey: false,
|
||||
@@ -137,6 +140,16 @@ import Cocoa
|
||||
}
|
||||
}
|
||||
|
||||
/// The number of search results that should be displayed.
|
||||
public dynamic var numberOfSearchResults: Int {
|
||||
set {
|
||||
NSUserDefaults.standardUserDefaults().setInteger(newValue, forKey: UserDefaultsConstants.numberOfSearchResultsKey)
|
||||
}
|
||||
get {
|
||||
return NSUserDefaults.standardUserDefaults().integerForKey(UserDefaultsConstants.numberOfSearchResultsKey)
|
||||
}
|
||||
}
|
||||
|
||||
/// If `true` the main table view will use 100x100 artworks instead of full
|
||||
/// sized images. This option does not affect saving.
|
||||
public dynamic var useLowResolutionArtwork: Bool {
|
||||
|
||||
Reference in New Issue
Block a user