mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-20 14:33:04 +01:00
Run the new-folder sheet on the frontmost window.
This commit is contained in:
parent
3612469954
commit
baaf9c1a02
@ -54,6 +54,8 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations {
|
||||
appDelegate = self
|
||||
}
|
||||
|
||||
// MARK: - API
|
||||
|
||||
func logMessage(_ message: String, type: LogItem.ItemType) {
|
||||
|
||||
let logItem = LogItem(type: type, message: message)
|
||||
@ -65,6 +67,12 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations {
|
||||
logMessage(message, type: .debug)
|
||||
}
|
||||
|
||||
func showAddFolderSheetOnWindow(_ window: NSWindow) {
|
||||
|
||||
addFolderWindowController = AddFolderWindowController()
|
||||
addFolderWindowController!.runSheetOnWindow(window)
|
||||
}
|
||||
|
||||
// MARK: - NSApplicationDelegate
|
||||
|
||||
func applicationDidFinishLaunching(_ note: Notification) {
|
||||
@ -211,9 +219,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations {
|
||||
@IBAction func showAddFolderWindow(_ sender: AnyObject) {
|
||||
|
||||
createAndShowMainWindow()
|
||||
|
||||
addFolderWindowController = AddFolderWindowController()
|
||||
addFolderWindowController!.runSheetOnWindow(mainWindowController!.window!)
|
||||
showAddFolderSheetOnWindow(mainWindowController!.window!)
|
||||
}
|
||||
|
||||
@IBAction func showFeedList(_ sender: AnyObject) {
|
||||
|
@ -111,6 +111,11 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
||||
|
||||
// MARK: Actions
|
||||
|
||||
@IBAction func showAddFolderWindow(_ sender: AnyObject) {
|
||||
|
||||
appDelegate.showAddFolderSheetOnWindow(window!)
|
||||
}
|
||||
|
||||
@IBAction func openArticleInBrowser(_ sender: AnyObject?) {
|
||||
|
||||
if let link = currentLink {
|
||||
|
Loading…
Reference in New Issue
Block a user