mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Merge pull request #1101 from kielgillard/1099-double-click-to-open-homepage
Double clicking a feed in the side bar…
This commit is contained in:
@@ -47,6 +47,7 @@ protocol SidebarDelegate: class {
|
||||
sidebarCellAppearance = SidebarCellAppearance(fontSize: AppDefaults.sidebarFontSize)
|
||||
|
||||
outlineView.dataSource = dataSource
|
||||
outlineView.doubleAction = #selector(doubleClickedSidebar(_:))
|
||||
outlineView.setDraggingSourceOperationMask([.move, .copy], forLocal: true)
|
||||
outlineView.registerForDraggedTypes([FeedPasteboardWriter.feedUTIInternalType, FeedPasteboardWriter.feedUTIType, .URL, .string])
|
||||
|
||||
@@ -153,6 +154,13 @@ protocol SidebarDelegate: class {
|
||||
}
|
||||
deleteNodes(selectedNodes)
|
||||
}
|
||||
|
||||
@IBAction func doubleClickedSidebar(_ sender: Any?) {
|
||||
guard outlineView.clickedRow == outlineView.selectedRow else {
|
||||
return
|
||||
}
|
||||
openInBrowser(sender)
|
||||
}
|
||||
|
||||
@IBAction func openInBrowser(_ sender: Any?) {
|
||||
guard let feed = singleSelectedFeed, let homePageURL = feed.homePageURL else {
|
||||
|
||||
Reference in New Issue
Block a user