Merge branch 'mac-release' into main
This commit is contained in:
commit
65510b1901
|
@ -96,7 +96,7 @@ class AddWebFeedWindowController : NSWindowController, AddFeedWindowController {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let container = selectedContainer()!
|
guard let container = selectedContainer() else { return }
|
||||||
AddWebFeedDefaultContainer.saveDefaultContainer(container)
|
AddWebFeedDefaultContainer.saveDefaultContainer(container)
|
||||||
|
|
||||||
delegate?.addFeedWindowController(self, userEnteredURL: url, userEnteredTitle: userEnteredTitle, container: container)
|
delegate?.addFeedWindowController(self, userEnteredURL: url, userEnteredTitle: userEnteredTitle, container: container)
|
||||||
|
@ -122,7 +122,7 @@ class AddWebFeedWindowController : NSWindowController, AddFeedWindowController {
|
||||||
private extension AddWebFeedWindowController {
|
private extension AddWebFeedWindowController {
|
||||||
|
|
||||||
private func updateUI() {
|
private func updateUI() {
|
||||||
addButton.isEnabled = urlTextField.stringValue.mayBeURL
|
addButton.isEnabled = urlTextField.stringValue.mayBeURL && selectedContainer() != nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func cancelSheet() {
|
func cancelSheet() {
|
||||||
|
@ -130,6 +130,7 @@ private extension AddWebFeedWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
func selectedContainer() -> Container? {
|
func selectedContainer() -> Container? {
|
||||||
|
guard folderPopupButton.selectedItem?.isEnabled ?? false else { return nil }
|
||||||
return folderPopupButton.selectedItem?.representedObject as? Container
|
return folderPopupButton.selectedItem?.representedObject as? Container
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,9 @@ final class MultilineTextFieldSizer {
|
||||||
}
|
}
|
||||||
|
|
||||||
static func size(for attributedString: NSAttributedString, numberOfLines: Int, width: Int) -> TextFieldSizeInfo {
|
static func size(for attributedString: NSAttributedString, numberOfLines: Int, width: Int) -> TextFieldSizeInfo {
|
||||||
|
guard attributedString.length > 0 else {
|
||||||
|
return TextFieldSizeInfo(size: NSSize.zero, numberOfLinesUsed: 0)
|
||||||
|
}
|
||||||
|
|
||||||
// Assumes the same font family/size for the whole string
|
// Assumes the same font family/size for the whole string
|
||||||
let font = attributedString.attribute(.font, at: 0, effectiveRange: nil) as! NSFont
|
let font = attributedString.attribute(.font, at: 0, effectiveRange: nil) as! NSFont
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// High Level Settings common to both the Mac application and any extensions we bundle with it
|
// High Level Settings common to both the Mac application and any extensions we bundle with it
|
||||||
MARKETING_VERSION = 5.1.2
|
MARKETING_VERSION = 5.1.3
|
||||||
CURRENT_PROJECT_VERSION = 3016
|
CURRENT_PROJECT_VERSION = 3018
|
||||||
|
|
||||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
|
|
Loading…
Reference in New Issue