+ } else if ( [sender tag] == 6010) {
+ //Toggle the other Audioscrobbler options
+ [df setBool:SENDER_STATE forKey:@"audioscrobblerEnabled"];
+ [audioscrobblerUseCacheCheckbox setEnabled:SENDER_STATE];
+ [audioscrobblerUserTextField setEnabled:SENDER_STATE];
+ [audioscrobblerPasswordTextField setEnabled:SENDER_STATE];
+ } else if ( [sender tag ] == 6015) {
+ [df setString:[sender stringValue] forKey:@"audioscrobblerUser"];
+ } else if ( [sender tag ] == 6030) {
+ //Set the password in the keychain
+ char *service = "Audioscrobbler";
+ NSString *account = [df stringForKey:@"audioscrobblerUser"];
+ SecKeychainItemRef item;
+ OSStatus status = SecKeychainFindGenericPassword(NULL, strlen(service), service, [account length], [account UTF8String], NULL, NULL, &item);
+ if (status == errSecItemNotFound) {
+ //Create the keychain
+ } else if (status == noErr) {
+ //Modify the current item
+ //SecKeychainItemFreeContent(NULL, item);
+ } else {
+ ITDebugLog(@"Audioscrobbler: Unable to retrieve keychain password.");
+ }
+ } else if ( [sender tag] == 6045) {
+ [df setBool:SENDER_STATE forKey:@"audioscrobblerCacheSubmissions"];
+ }