Only enable export actions when document is actually open
This commit is contained in:
parent
0c015e2327
commit
e3b94dee42
2 changed files with 6 additions and 6 deletions
|
@ -16,7 +16,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations {
|
||||||
|
|
||||||
func validateUserInterfaceItem(_ item: NSValidatedUserInterfaceItem) -> Bool {
|
func validateUserInterfaceItem(_ item: NSValidatedUserInterfaceItem) -> Bool {
|
||||||
// Show timelapse and show info buttons
|
// Show timelapse and show info buttons
|
||||||
if(item.tag == 67 || item.tag == 68) {
|
if(item.tag == 67 || item.tag == 68 || item.tag == 100 || item.tag == 101 || item.tag == 102) {
|
||||||
return NSApplication.shared.keyWindow != nil
|
return NSApplication.shared.keyWindow != nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="19529" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="macosx"/>
|
<deployment identifier="macosx"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19162"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19529"/>
|
||||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<scenes>
|
<scenes>
|
||||||
|
@ -79,17 +79,17 @@
|
||||||
</menu>
|
</menu>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
<menuItem isSeparatorItem="YES" id="MaD-eL-lbO"/>
|
<menuItem isSeparatorItem="YES" id="MaD-eL-lbO"/>
|
||||||
<menuItem title="Export..." keyEquivalent="s" id="ShN-CZ-HNV" userLabel="Export...">
|
<menuItem title="Export..." tag="100" keyEquivalent="s" id="ShN-CZ-HNV" userLabel="Export...">
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="exportAction:" target="Voe-Tx-rLC" id="2gQ-9c-0xy"/>
|
<action selector="exportAction:" target="Voe-Tx-rLC" id="2gQ-9c-0xy"/>
|
||||||
</connections>
|
</connections>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
<menuItem title="Export Thumbnail..." keyEquivalent="S" id="JR5-se-hvt" userLabel="Export Thumbnail...">
|
<menuItem title="Export Thumbnail..." tag="101" keyEquivalent="S" id="JR5-se-hvt" userLabel="Export Thumbnail...">
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="exportThumbnailAction:" target="Voe-Tx-rLC" id="zki-Tz-dom"/>
|
<action selector="exportThumbnailAction:" target="Voe-Tx-rLC" id="zki-Tz-dom"/>
|
||||||
</connections>
|
</connections>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
<menuItem title="Export Timelapse..." keyEquivalent="S" id="mOL-Am-v5d" userLabel="Export Timelapse...">
|
<menuItem title="Export Timelapse..." tag="102" keyEquivalent="S" id="mOL-Am-v5d" userLabel="Export Timelapse...">
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="exportTimelapseAction:" target="Voe-Tx-rLC" id="U6F-oD-VRr"/>
|
<action selector="exportTimelapseAction:" target="Voe-Tx-rLC" id="U6F-oD-VRr"/>
|
||||||
</connections>
|
</connections>
|
||||||
|
|
Reference in a new issue