Remove Navigation->Forward menu item and IBOutlet references; restore missing navigateBackMenuItem IBOutlet and fix Navigate->Back menu item availability to match visibility of back navigation button

This commit is contained in:
Greg Neagle
2020-09-10 13:51:52 -07:00
parent e2b7b87b17
commit 770bd30117
2 changed files with 11 additions and 18 deletions
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="16097" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16097.2"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16097"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -48,7 +48,6 @@
<outlet property="myItemsMenuItem" destination="1bG-B4-adC" id="PCP-Ye-eRl"/>
<outlet property="navigateBackButton" destination="i5p-mb-nwY" id="kAW-CK-XkD"/>
<outlet property="navigateBackMenuItem" destination="4nC-yt-nEz" id="bDM-jd-pUL"/>
<outlet property="navigateForwardMenuItem" destination="nIf-zM-816" id="l80-4O-0q4"/>
<outlet property="progressSpinner" destination="Ti6-HC-kVU" id="PkK-Fh-91U"/>
<outlet property="searchField" destination="0L3-LH-chu" id="yAV-Sz-rao"/>
<outlet property="sidebar" destination="pGV-ZA-L14" id="rl2-BU-gEi"/>
@@ -155,11 +154,6 @@
<action selector="navigateBackBtnClicked:" target="XGW-R4-ybE" id="1Js-TT-NXZ"/>
</connections>
</menuItem>
<menuItem title="Forward" keyEquivalent="]" id="nIf-zM-816">
<connections>
<action selector="navigateForwardBtnClicked:" target="XGW-R4-ybE" id="SFV-5J-eBx"/>
</connections>
</menuItem>
<menuItem title="Reload Page" keyEquivalent="r" id="RZb-6e-dMo">
<connections>
<action selector="reloadPage:" target="XGW-R4-ybE" id="0AT-pi-VuZ"/>
@@ -249,7 +243,7 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES" resizable="YES"/>
<windowCollectionBehavior key="collectionBehavior" fullScreenNone="YES"/>
<rect key="contentRect" x="636" y="390" width="512" height="360"/>
<rect key="screenRect" x="0.0" y="0.0" width="3440" height="1417"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>
<value key="minSize" type="size" width="512" height="360"/>
<view key="contentView" id="QRQ-UP-dFP">
<rect key="frame" x="0.0" y="0.0" width="512" height="360"/>
@@ -260,7 +254,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<clipView key="contentView" id="tqD-vb-lE4">
<rect key="frame" x="0.0" y="0.0" width="514" height="325"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<tableView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" autosaveColumns="NO" typeSelect="NO" id="rzT-c7-fSM">
<rect key="frame" x="0.0" y="0.0" width="514" height="325"/>
@@ -334,7 +328,7 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" fullSizeContentView="YES"/>
<windowCollectionBehavior key="collectionBehavior" fullScreenPrimary="YES"/>
<rect key="contentRect" x="132" y="116" width="1000" height="500"/>
<rect key="screenRect" x="0.0" y="0.0" width="3440" height="1417"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>
<value key="minSize" type="size" width="1000" height="500"/>
<view key="contentView" id="H4V-bM-OJY">
<rect key="frame" x="0.0" y="0.0" width="1000" height="500"/>
@@ -449,12 +443,12 @@
</view>
<toolbar key="toolbar" implicitIdentifier="15CD5D47-D75F-4666-8C9B-7883C32CA42D" autosavesConfiguration="NO" allowsUserCustomization="NO" showsBaselineSeparator="NO" displayMode="iconAndLabel" sizeMode="regular" id="ijT-fF-8BM">
<allowedToolbarItems>
<toolbarItem implicitItemIdentifier="57AADEAF-64E5-4DFD-98F9-EC05E4894264" label="Custom View" paletteLabel="Custom View" image="NSGoLeftTemplate" id="Nd5-Qh-Y9u">
<toolbarItem implicitItemIdentifier="57AADEAF-64E5-4DFD-98F9-EC05E4894264" label="Back" paletteLabel="Back" image="NSGoLeftTemplate" id="Nd5-Qh-Y9u">
<nil key="toolTip"/>
<size key="minSize" width="50" height="32"/>
<size key="maxSize" width="50" height="32"/>
<button key="view" hidden="YES" verticalHuggingPriority="750" id="i5p-mb-nwY">
<rect key="frame" x="13" y="14" width="50" height="32"/>
<rect key="frame" x="0.0" y="14" width="50" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" bezelStyle="rounded" image="NSGoLeftTemplate" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="qm2-YV-4Z6">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -465,9 +459,6 @@
</connections>
</button>
</toolbarItem>
<toolbarItem implicitItemIdentifier="NSToolbarShowColorsItem" id="jtj-7D-eHf"/>
<toolbarItem implicitItemIdentifier="NSToolbarShowFontsItem" id="T90-7P-21p"/>
<toolbarItem implicitItemIdentifier="NSToolbarPrintItem" id="T6f-O6-6lC"/>
<toolbarItem implicitItemIdentifier="NSToolbarSpaceItem" id="VPN-z1-8F8"/>
<toolbarItem implicitItemIdentifier="NSToolbarFlexibleSpaceItem" id="ark-q4-SIB"/>
</allowedToolbarItems>
@@ -39,18 +39,19 @@ class MainWindowController: NSWindowController, NSWindowDelegate, WKNavigationDe
@IBOutlet weak var updateButtonCell: MSCToolbarButtonCell!
@IBOutlet weak var navigateBackButton: NSButton!
@IBOutlet weak var navigateForwardButton: NSButton!
@IBOutlet weak var progressSpinner: NSProgressIndicator!
@IBOutlet weak var searchField: NSSearchField!
@IBOutlet weak var sidebar: NSOutlineView!
@IBOutlet weak var navigateBackMenuItem: NSMenuItem!
@IBOutlet weak var findMenuItem: NSMenuItem!
@IBOutlet weak var softwareMenuItem: NSMenuItem!
@IBOutlet weak var categoriesMenuItem: NSMenuItem!
@IBOutlet weak var myItemsMenuItem: NSMenuItem!
@IBOutlet weak var updatesMenuItem: NSMenuItem!
@IBOutlet weak var findMenuItem: NSMenuItem!
@IBOutlet weak var webViewPlaceholder: NSView!
var webView: WKWebView!
@@ -1020,6 +1021,7 @@ class MainWindowController: NSWindowController, NSWindowDelegate, WKNavigationDe
let page_url = webView.url
let filename = page_url?.lastPathComponent ?? ""
navigateBackButton.isHidden = !filename.hasPrefix("detail-")
navigateBackMenuItem.isEnabled = filename.hasPrefix("detail-")
}
func webView(_ webView: WKWebView,