- Implemented App Sandboxing in a more friendly manner. - All sandboxed paths will need to be set in Preferences. Set as loose a path as you want. The shortest path will be preferred. - Removed Last.fm client support, as it was non-functional by now, unfortunately. Maybe something better can come in the future. - Added support for insecure SSL to the HTTP/S reader, in case anyone needs streams which are "protected" by self-signed or expired certificates, without having to futz around by adding certificates to the system settings, especially for expired certificates that can't otherwise be dodged this way. If you want to import your old playlists to the new version, copy the contents of `~/Library/Application Support/Cog` to the alternate sandbox path: `~/Library/Containers/org.cogx.cog/Data/Library/Application `... ...continued...`Support/Cog`. The preferences file will migrate to the new version automatically. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
94 lines
3.1 KiB
Objective-C
94 lines
3.1 KiB
Objective-C
//
|
|
// PreferencesController.m
|
|
// Preferences
|
|
//
|
|
// Created by Vincent Spader on 9/4/06.
|
|
// Copyright 2006 Vincent Spader. All rights reserved.
|
|
//
|
|
|
|
#import "GeneralPreferencesPlugin.h"
|
|
#import "ColorToValueTransformer.h"
|
|
#import "PathToFileTransformer.h"
|
|
|
|
@implementation GeneralPreferencesPlugin
|
|
|
|
+ (void)initialize {
|
|
NSValueTransformer *pathToFileTransformer = [[PathToFileTransformer alloc] init];
|
|
[NSValueTransformer setValueTransformer:pathToFileTransformer
|
|
forName:@"PathToFileTransformer"];
|
|
|
|
NSValueTransformer *colorToValueTransformer = [[ColorToValueTransformer alloc] init];
|
|
[NSValueTransformer setValueTransformer:colorToValueTransformer
|
|
forName:@"ColorToValueTransformer"];
|
|
}
|
|
|
|
+ (NSArray *)preferencePanes {
|
|
GeneralPreferencesPlugin *plugin = [[GeneralPreferencesPlugin alloc] init];
|
|
[[NSBundle bundleWithIdentifier:@"org.cogx.cog.preferences"] loadNibNamed:@"Preferences"
|
|
owner:plugin
|
|
topLevelObjects:nil];
|
|
|
|
return @[[plugin playlistPane],
|
|
[plugin hotKeyPane],
|
|
[plugin updatesPane],
|
|
[plugin outputPane],
|
|
[plugin generalPane],
|
|
[plugin notificationsPane],
|
|
[plugin appearancePane],
|
|
[plugin midiPane]];
|
|
}
|
|
|
|
- (HotKeyPane *)hotKeyPane {
|
|
return hotKeyPane;
|
|
}
|
|
|
|
- (OutputPane *)outputPane {
|
|
return outputPane;
|
|
}
|
|
|
|
- (MIDIPane *)midiPane {
|
|
return midiPane;
|
|
}
|
|
|
|
- (GeneralPane *)generalPane {
|
|
return generalPane;
|
|
}
|
|
|
|
- (GeneralPreferencePane *)updatesPane {
|
|
return [GeneralPreferencePane preferencePaneWithView:updatesView
|
|
title:NSLocalizedPrefString(@"Updates")
|
|
systemIconName:@"arrow.triangle.2.circlepath.circle.fill"
|
|
orOldIconNamed:@"updates"];
|
|
}
|
|
|
|
- (GeneralPreferencePane *)playlistPane {
|
|
return [GeneralPreferencePane preferencePaneWithView:playlistView
|
|
title:NSLocalizedPrefString(@"Playlist")
|
|
systemIconName:@"music.note.list"
|
|
orOldIconNamed:@"playlist"];
|
|
}
|
|
|
|
- (GeneralPreferencePane *)notificationsPane {
|
|
if(@available(macOS 10.14, *)) {
|
|
if(iTunesStyleCheck) {
|
|
iTunesStyleCheck.hidden = YES;
|
|
NSSize size = notificationsView.frame.size;
|
|
size.height -= 18;
|
|
[notificationsView setFrameSize:size];
|
|
}
|
|
}
|
|
|
|
return [GeneralPreferencePane preferencePaneWithView:notificationsView
|
|
title:NSLocalizedPrefString(@"Notifications")
|
|
systemIconName:@"bell.fill"
|
|
orOldIconNamed:@"growl"];
|
|
}
|
|
|
|
- (GeneralPreferencePane *)appearancePane {
|
|
return [GeneralPreferencePane preferencePaneWithView:appearanceView
|
|
title:NSLocalizedPrefString(@"Appearance")
|
|
systemIconName:@"paintpalette.fill"
|
|
orOldIconNamed:@"appearance"];
|
|
}
|
|
|
|
@end
|