Archived
1

Added preference for the used iTunes Store.

This commit is contained in:
Kim Wittenburg
2015-09-16 19:41:44 +02:00
committed by Kim Wittenburg
parent 548214479a
commit 8d4fba8d8a
6 changed files with 98 additions and 17 deletions

View File

@@ -42,6 +42,20 @@ internal class GeneralPreferencesViewController: NSViewController {
}
}
dynamic var iTunesStores: [String] {
return NSLocale.ISOCountryCodes().map { NSLocale.currentLocale().displayNameForKey(NSLocaleCountryCode, value: $0)! }
}
dynamic var currentITunesStoreIndex: Int {
set {
let countryCode = NSLocale.ISOCountryCodes()[newValue]
Preferences.sharedPreferences.iTunesStore = countryCode
}
get {
return NSLocale.ISOCountryCodes().indexOf(Preferences.sharedPreferences.iTunesStore)!
}
}
}
internal class TagsPreferencesViewController: NSViewController, NSTableViewDataSource, NSTableViewDelegate, NSMenuDelegate {