Add File menu commands.

This commit is contained in:
Brent Simmons 2017-05-27 11:33:31 -07:00
parent 53f98e366a
commit f58f9244f5
2 changed files with 36 additions and 44 deletions

View File

@ -212,10 +212,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
feedListWindowController!.showWindow(self) feedListWindowController!.showWindow(self)
} }
// @IBAction func exportOPML(_ sender: AnyObject) {
//
// }
@IBAction func importOPMLFromFile(_ sender: AnyObject) { @IBAction func importOPMLFromFile(_ sender: AnyObject) {
let panel = NSOpenPanel() let panel = NSOpenPanel()
@ -238,6 +234,10 @@ class AppDelegate: NSObject, NSApplicationDelegate {
} }
} }
@IBAction func importOPMLFromURL(_ sender: AnyObject) {
}
@IBAction func exportOPML(_ sender: AnyObject) { @IBAction func exportOPML(_ sender: AnyObject) {
let panel = NSSavePanel() let panel = NSSavePanel()
@ -283,10 +283,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
} }
addFeed(appNewsURLString, "Evergreen News") addFeed(appNewsURLString, "Evergreen News")
} }
// @IBAction func importOPMLFromURL(_ sender: AnyObject) {
//
// }
} }
private extension AppDelegate { private extension AppDelegate {

View File

@ -27,6 +27,9 @@
<action selector="showPreferences:" target="Ady-hI-5gd" id="Syu-AN-6P4"/> <action selector="showPreferences:" target="Ady-hI-5gd" id="Syu-AN-6P4"/>
</connections> </connections>
</menuItem> </menuItem>
<menuItem title="Check for Updates…" id="1nF-7O-aKU">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/> <menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
<menuItem title="Services" id="NMo-om-nkz"> <menuItem title="Services" id="NMo-om-nkz">
<modifierMask key="keyEquivalentModifierMask"/> <modifierMask key="keyEquivalentModifierMask"/>
@ -63,62 +66,55 @@
<modifierMask key="keyEquivalentModifierMask"/> <modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="File" id="bib-Uj-vzu"> <menu key="submenu" title="File" id="bib-Uj-vzu">
<items> <items>
<menuItem title="New" keyEquivalent="n" id="Was-JA-tGl"> <menuItem title="New Feed" keyEquivalent="n" id="Was-JA-tGl">
<connections> <connections>
<action selector="newDocument:" target="Ady-hI-5gd" id="4Si-XN-c54"/> <action selector="showAddFeedWindow:" target="Ady-hI-5gd" id="LkT-kx-aCR"/>
</connections> </connections>
</menuItem> </menuItem>
<menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9"> <menuItem title="New Folder" keyEquivalent="n" id="wkh-LX-Xp1">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections> <connections>
<action selector="openDocument:" target="Ady-hI-5gd" id="bVn-NM-KNZ"/> <action selector="showAddFolderWindow:" target="Ady-hI-5gd" id="GIi-wc-uYk"/>
</connections> </connections>
</menuItem> </menuItem>
<menuItem title="Open Recent" id="tXI-mr-wws"> <menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
<menuItem title="Refresh" keyEquivalent="r" id="Veh-SV-KWy">
<connections>
<action selector="refreshAll:" target="Ady-hI-5gd" id="gIc-Zj-9tB"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
<menuItem title="Import" id="JcK-3V-6nM">
<modifierMask key="keyEquivalentModifierMask"/> <modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ"> <menu key="submenu" title="Import" id="AIV-3D-omy">
<items> <items>
<menuItem title="Clear Menu" id="vNY-rz-j42"> <menuItem title="OPML from File…" id="8oh-Mr-MuT">
<modifierMask key="keyEquivalentModifierMask"/> <modifierMask key="keyEquivalentModifierMask"/>
<connections> <connections>
<action selector="clearRecentDocuments:" target="Ady-hI-5gd" id="Daa-9d-B3U"/> <action selector="importOPMLFromFile:" target="Ady-hI-5gd" id="37m-qI-pOs"/>
</connections>
</menuItem>
<menuItem title="OPML from URL…" id="Ltl-g5-IZS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="importOPMLFromURL:" target="Ady-hI-5gd" id="UAr-gI-Lxg"/>
</connections> </connections>
</menuItem> </menuItem>
</items> </items>
</menu> </menu>
</menuItem> </menuItem>
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/> <menuItem title="Export OPML…" keyEquivalent="e" id="Xy2-v8-Lj8">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="exportOPML:" target="Ady-hI-5gd" id="5Zy-m4-cE9"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="FYN-zt-6dI"/>
<menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG"> <menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
<connections> <connections>
<action selector="performClose:" target="Ady-hI-5gd" id="HmO-Ls-i7Q"/> <action selector="performClose:" target="Ady-hI-5gd" id="HmO-Ls-i7Q"/>
</connections> </connections>
</menuItem> </menuItem>
<menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
<connections>
<action selector="saveDocument:" target="Ady-hI-5gd" id="teZ-XB-qJY"/>
</connections>
</menuItem>
<menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
<connections>
<action selector="saveDocumentAs:" target="Ady-hI-5gd" id="mDf-zr-I0C"/>
</connections>
</menuItem>
<menuItem title="Revert to Saved" keyEquivalent="r" id="KaW-ft-85H">
<connections>
<action selector="revertDocumentToSaved:" target="Ady-hI-5gd" id="iJ3-Pv-kwq"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
<menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
<connections>
<action selector="runPageLayout:" target="Ady-hI-5gd" id="Din-rz-gC5"/>
</connections>
</menuItem>
<menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
<connections>
<action selector="print:" target="Ady-hI-5gd" id="qaZ-4w-aoO"/>
</connections>
</menuItem>
</items> </items>
</menu> </menu>
</menuItem> </menuItem>