Open your Preferences.mm (or whatever you called it) and paste this new code inside before the // vim:ft=objc
where CUSTOMNAME is the name of the new property list you want to add for your PSLink.
@interface CUSTOMNAMEListController: PSListController {
}
@end
@implementation CUSTOMNAMEListController
- (id)specifiers {
if(_specifiers == nil) {
_specifiers = [[self loadSpecifiersFromPlistName:@"CUSTOMNAME" target:self] retain];
}
return _specifiers;
}
@end
Now open your main property list. As you already know some XML basics from other preference specifiers, this is the new PSLinkCell which appears in your preference pane. You don't add the swiches you want inside the new PSLink inside this property list. You'll see it later.
<dict>
<key>cell</key>
<string>PSLinkCell</string>
<key>detail</key>
<string>CUSTOMNAMEListController</string>
<key>isController</key>
<string>1</string>
<key>label</key>
<string>CUSTOMNAME</string>
</dict>
Finally create a new property list (plist) with your custom name you've chosen previously. In the new plist you can add all items for the PSLinkCell. All your switches, sliders, buttons, segments etc.
The new property list is also going to be in your Resources folder unlike the Preferences.mm.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>Preferences</string>
<key>key</key>
<string>Key</string>
<key>label</key>
<string>Example for a PSSwitchCell</string>
</dict>
</array>
<key>title</key>
<string>CUSTOMNAME</string>
</dict>
</plist>