customized open panels throughout the app. Added brows plugins button to plugin settings

This commit is contained in:
michael starke
2017-11-16 17:55:08 +01:00
parent 29a6c39c1f
commit 36b98bcd6d
6 changed files with 28 additions and 1 deletions

View File

@@ -115,6 +115,10 @@ typedef NS_ENUM(NSUInteger, MPPluginSegmentType) {
[self showSettingsForPlugin:plugin];
}
- (IBAction)browsePlugins:(id)sender {
[NSWorkspace.sharedWorkspace openURL:[NSApp applicationSupportDirectoryURL:YES]];
}
- (IBAction)addOrRemovePlugin:(id)sender {
if(sender != self.addRemovePluginsControl) {
return;
@@ -136,6 +140,8 @@ typedef NS_ENUM(NSUInteger, MPPluginSegmentType) {
openPanel.allowsMultipleSelection = NO;
openPanel.canChooseFiles = YES;
openPanel.canChooseDirectories = NO;
openPanel.prompt = NSLocalizedString(@"OPEN_BUTTON_ADD_PLUGIN_OPEN_PANEL", "Open button in the add plugin open panel");
openPanel.message = NSLocalizedString(@"MESSAGE_ADD_PLUGIN_OPEN_PANEL", "Message in the add plugin open panel");
[openPanel beginSheetModalForWindow:self.view.window completionHandler:^(NSModalResponse result) {
if(NSModalResponseOK) {
if(openPanel.URLs.count == 1) {