Reorder code to match new toolbar order
This commit is contained in:
parent
88c33283bf
commit
117f6ccf6f
|
@ -749,13 +749,6 @@ extension MainWindowController: NSToolbarDelegate {
|
||||||
toolbarItem.menu = buildNewSidebarItemMenu()
|
toolbarItem.menu = buildNewSidebarItemMenu()
|
||||||
return toolbarItem
|
return toolbarItem
|
||||||
|
|
||||||
case .search:
|
|
||||||
let toolbarItem = NSSearchToolbarItem(itemIdentifier: .search)
|
|
||||||
let description = NSLocalizedString("Search", comment: "Search")
|
|
||||||
toolbarItem.toolTip = description
|
|
||||||
toolbarItem.label = description
|
|
||||||
return toolbarItem
|
|
||||||
|
|
||||||
case .markAllAsRead:
|
case .markAllAsRead:
|
||||||
let title = NSLocalizedString("Mark All as Read", comment: "Mark All as Read")
|
let title = NSLocalizedString("Mark All as Read", comment: "Mark All as Read")
|
||||||
return buildToolbarButton(.markAllAsRead, title, AppAssets.markAllAsReadImage, "markAllAsRead:")
|
return buildToolbarButton(.markAllAsRead, title, AppAssets.markAllAsReadImage, "markAllAsRead:")
|
||||||
|
@ -763,10 +756,6 @@ extension MainWindowController: NSToolbarDelegate {
|
||||||
case .timelineTrackingSeparator:
|
case .timelineTrackingSeparator:
|
||||||
return NSTrackingSeparatorToolbarItem(identifier: .timelineTrackingSeparator, splitView: splitViewController!.splitView, dividerIndex: 1)
|
return NSTrackingSeparatorToolbarItem(identifier: .timelineTrackingSeparator, splitView: splitViewController!.splitView, dividerIndex: 1)
|
||||||
|
|
||||||
case .nextUnread:
|
|
||||||
let title = NSLocalizedString("Next Unread", comment: "Next Unread")
|
|
||||||
return buildToolbarButton(.nextUnread, title, AppAssets.nextUnreadImage, "nextUnread:")
|
|
||||||
|
|
||||||
case .markRead:
|
case .markRead:
|
||||||
let title = NSLocalizedString("Mark Read", comment: "Mark Read")
|
let title = NSLocalizedString("Mark Read", comment: "Mark Read")
|
||||||
return buildToolbarButton(.markRead, title, AppAssets.readClosedImage, "toggleRead:")
|
return buildToolbarButton(.markRead, title, AppAssets.readClosedImage, "toggleRead:")
|
||||||
|
@ -775,6 +764,10 @@ extension MainWindowController: NSToolbarDelegate {
|
||||||
let title = NSLocalizedString("Star", comment: "Star")
|
let title = NSLocalizedString("Star", comment: "Star")
|
||||||
return buildToolbarButton(.markStar, title, AppAssets.starOpenImage, "toggleStarred:")
|
return buildToolbarButton(.markStar, title, AppAssets.starOpenImage, "toggleStarred:")
|
||||||
|
|
||||||
|
case .nextUnread:
|
||||||
|
let title = NSLocalizedString("Next Unread", comment: "Next Unread")
|
||||||
|
return buildToolbarButton(.nextUnread, title, AppAssets.nextUnreadImage, "nextUnread:")
|
||||||
|
|
||||||
case .readerView:
|
case .readerView:
|
||||||
let toolbarItem = RSToolbarItem(itemIdentifier: .readerView)
|
let toolbarItem = RSToolbarItem(itemIdentifier: .readerView)
|
||||||
toolbarItem.autovalidates = true
|
toolbarItem.autovalidates = true
|
||||||
|
@ -786,13 +779,20 @@ extension MainWindowController: NSToolbarDelegate {
|
||||||
toolbarItem.view = button
|
toolbarItem.view = button
|
||||||
return toolbarItem
|
return toolbarItem
|
||||||
|
|
||||||
|
case .share:
|
||||||
|
let title = NSLocalizedString("Share", comment: "Share")
|
||||||
|
return buildToolbarButton(.share, title, AppAssets.shareImage, "toolbarShowShareMenu:")
|
||||||
|
|
||||||
case .openInBrowser:
|
case .openInBrowser:
|
||||||
let title = NSLocalizedString("Open in Browser", comment: "Open in Browser")
|
let title = NSLocalizedString("Open in Browser", comment: "Open in Browser")
|
||||||
return buildToolbarButton(.openInBrowser, title, AppAssets.openInBrowserImage, "openArticleInBrowser:")
|
return buildToolbarButton(.openInBrowser, title, AppAssets.openInBrowserImage, "openArticleInBrowser:")
|
||||||
|
|
||||||
case .share:
|
case .search:
|
||||||
let title = NSLocalizedString("Share", comment: "Share")
|
let toolbarItem = NSSearchToolbarItem(itemIdentifier: .search)
|
||||||
return buildToolbarButton(.share, title, AppAssets.shareImage, "toolbarShowShareMenu:")
|
let description = NSLocalizedString("Search", comment: "Search")
|
||||||
|
toolbarItem.toolTip = description
|
||||||
|
toolbarItem.label = description
|
||||||
|
return toolbarItem
|
||||||
|
|
||||||
case .cleanUp:
|
case .cleanUp:
|
||||||
let title = NSLocalizedString("Clean Up", comment: "Clean Up")
|
let title = NSLocalizedString("Clean Up", comment: "Clean Up")
|
||||||
|
|
Loading…
Reference in New Issue