diff options
author | Damiano Galassi <[email protected]> | 2017-11-24 18:01:43 +0100 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2017-11-24 18:01:43 +0100 |
commit | 68c7758a7cf0a397b6dfc584792a8958ddd01322 (patch) | |
tree | 14babe731d94d2ace06e2b1058e13cf8e0221581 /macosx/HBController.m | |
parent | b73dabc600420663a5962d3da5decdd8c3a7bbd1 (diff) |
MacGui: add a popup button to select the preset in the main window.
Diffstat (limited to 'macosx/HBController.m')
-rw-r--r-- | macosx/HBController.m | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/macosx/HBController.m b/macosx/HBController.m index 32995f738..42488ccba 100644 --- a/macosx/HBController.m +++ b/macosx/HBController.m @@ -14,6 +14,7 @@ #import "HBPresetsManager.h" #import "HBPreset.h" #import "HBMutablePreset.h" +#import "HBPresetsMenuBuilder.h" #import "HBSummaryViewController.h" #import "HBPictureViewController.h" @@ -99,6 +100,9 @@ IBOutlet NSDrawer * fPresetDrawer; } +@property (nonatomic, strong) HBPresetsMenuBuilder *presetsMenuBuilder; +@property (nonatomic, strong) IBOutlet NSPopUpButton *presetsPopup; + @property (nonatomic, strong) HBSummaryViewController *summaryController; @property (nonatomic, strong) IBOutlet NSTabViewItem *summaryTab; @@ -282,7 +286,14 @@ forKeyPath:@"values.HBShowAdvancedTab" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial context:NULL]; - + + + self.presetsMenuBuilder = [[HBPresetsMenuBuilder alloc] initWithMenu:self.presetsPopup.menu + action:@selector(selectPresetFromMenu:) + size:[NSFont smallSystemFontSize] + presetsManager:presetManager]; + [self.presetsMenuBuilder build]; + [self.window recalculateKeyViewLoop]; } |