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 {
|
||||
// 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
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,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>
|
||||
<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"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
|
@ -79,17 +79,17 @@
|
|||
</menu>
|
||||
</menuItem>
|
||||
<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>
|
||||
<action selector="exportAction:" target="Voe-Tx-rLC" id="2gQ-9c-0xy"/>
|
||||
</connections>
|
||||
</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>
|
||||
<action selector="exportThumbnailAction:" target="Voe-Tx-rLC" id="zki-Tz-dom"/>
|
||||
</connections>
|
||||
</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>
|
||||
<action selector="exportTimelapseAction:" target="Voe-Tx-rLC" id="U6F-oD-VRr"/>
|
||||
</connections>
|
||||
|
|
Reference in a new issue