diff options
author | Bradley Sepos <[email protected]> | 2018-02-01 01:37:58 -0500 |
---|---|---|
committer | Bradley Sepos <[email protected]> | 2018-03-17 17:01:55 -0400 |
commit | 6e044c7715aabdc681a6b4f8c33d141712433cc9 (patch) | |
tree | f0a0c1b5502f4d745f2b387c8e5d45306963afee /macosx | |
parent | cb4e6cfd256488910ef8be784d2654204c607ee9 (diff) |
MacGUI: Add Delete item to Presets menu.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/English.lproj/MainMenu.xib | 14 | ||||
-rw-r--r-- | macosx/HBController.h | 1 | ||||
-rw-r--r-- | macosx/HBController.m | 6 | ||||
-rw-r--r-- | macosx/HBPresetsViewController.h | 2 |
4 files changed, 20 insertions, 3 deletions
diff --git a/macosx/English.lproj/MainMenu.xib b/macosx/English.lproj/MainMenu.xib index 9d2861d10..6f468a964 100644 --- a/macosx/English.lproj/MainMenu.xib +++ b/macosx/English.lproj/MainMenu.xib @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13770" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13771" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> <dependencies> <deployment identifier="macosx"/> <development version="8000" identifier="xcode"/> - <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13770"/> + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13771"/> </dependencies> <objects> <customObject id="-2" userLabel="File's Owner" customClass="NSApplication"> @@ -337,7 +337,7 @@ <action selector="insertCategory:" target="-1" id="JL7-bI-H97"/> </connections> </menuItem> - <menuItem isSeparatorItem="YES" tag="-1" id="1954"> + <menuItem isSeparatorItem="YES" tag="-1" id="ymY-bE-5EP"> <modifierMask key="keyEquivalentModifierMask" command="YES"/> </menuItem> <menuItem title="Select Default Preset" tag="-1" id="2421"> @@ -345,6 +345,14 @@ <action selector="selectDefaultPreset:" target="-1" id="2eH-zk-T3n"/> </connections> </menuItem> + <menuItem isSeparatorItem="YES" tag="-1" id="1954"> + <modifierMask key="keyEquivalentModifierMask" command="YES"/> + </menuItem> + <menuItem title="Delete Preset" tag="-1" id="CN3-Rh-gVf"> + <connections> + <action selector="deletePreset:" target="-1" id="ZGV-Ji-MGc"/> + </connections> + </menuItem> <menuItem isSeparatorItem="YES" tag="-1" id="CQW-qW-5C5"> <modifierMask key="keyEquivalentModifierMask" command="YES"/> </menuItem> diff --git a/macosx/HBController.h b/macosx/HBController.h index 0334a012e..b93fefb24 100644 --- a/macosx/HBController.h +++ b/macosx/HBController.h @@ -40,6 +40,7 @@ - (IBAction)showAddPresetPanel:(id)sender; - (IBAction)selectDefaultPreset:(id)sender; +- (IBAction)deletePreset:(id)sender; - (IBAction)reloadPreset:(id)sender; diff --git a/macosx/HBController.m b/macosx/HBController.m index 5c022fa5a..5a7f1ce37 100644 --- a/macosx/HBController.m +++ b/macosx/HBController.m @@ -1527,6 +1527,12 @@ fPresetsView.selectedPreset = presetManager.defaultPreset; } +- (IBAction)deletePreset:(id)sender +{ + HBPreset *preset = [sender representedObject]; + [fPresetsView deletePreset:preset]; +} + - (IBAction)insertCategory:(id)sender { [fPresetsView insertCategory:sender]; diff --git a/macosx/HBPresetsViewController.h b/macosx/HBPresetsViewController.h index e3cca8cd1..8f5824a8e 100644 --- a/macosx/HBPresetsViewController.h +++ b/macosx/HBPresetsViewController.h @@ -24,6 +24,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, readwrite, assign) id<HBPresetsViewControllerDelegate> delegate; +- (IBAction)deletePreset:(id)sender; + - (IBAction)exportPreset:(id)sender; - (IBAction)importPreset:(id)sender; |