Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb8f5be289 | ||
|
|
51e1f07531 | ||
|
|
b21cc20746 | ||
|
|
be600b6c5f | ||
|
|
a9c3ccc1f7 | ||
|
|
c4c5559d2d | ||
|
|
68b25d10dd | ||
|
|
24c785662a | ||
|
|
2a589f51a8 | ||
|
|
30527d50e6 | ||
|
|
eb06793b8f | ||
|
|
af89e58a9c | ||
|
|
364811642a | ||
|
|
a342104219 | ||
|
|
26151819c4 | ||
|
|
e0dec3adf9 | ||
|
|
f7eb63bed9 | ||
|
|
23f4f125db | ||
|
|
b3940f103a | ||
|
|
239527908f | ||
|
|
7df70a7936 | ||
|
|
e8c4c06d33 | ||
|
|
a9c0e64689 | ||
|
|
51dd688801 | ||
|
|
352428679d | ||
|
|
9b20262207 | ||
|
|
47a0e76cb3 |
70
CHANGELOG.md
70
CHANGELOG.md
@@ -8,19 +8,64 @@ and this project does adhere to [Semantic Versioning](https://semver.org/spec/v2
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
|
||||||
## [1.0.2] - 2019-10-25
|
## [1.2.2] – 2023-06-18
|
||||||
|
### Fixed
|
||||||
|
- Feed menu sporadically not opening
|
||||||
|
|
||||||
|
|
||||||
|
## [1.2.1] – 2023-06-17
|
||||||
|
### Added
|
||||||
|
- Universal binary (Intel+AppleSilicon)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Autoresize issues of UI elements in macOS Ventura
|
||||||
|
- Flexible width TabBarItem
|
||||||
|
- Updated About page (removed dead link)
|
||||||
|
|
||||||
|
|
||||||
|
## [1.2.0] – 2022-10-01
|
||||||
|
### Added
|
||||||
|
- *UI*: Add option to hide read articles (show only unread)
|
||||||
|
|
||||||
|
|
||||||
|
## [1.1.3] – 2020-12-18
|
||||||
|
### Fixed
|
||||||
|
- Recognize YouTube channel URLs in the format `/c/channel-name`
|
||||||
|
|
||||||
|
|
||||||
|
## [1.1.2] – 2020-11-27
|
||||||
|
### Fixed
|
||||||
|
- Fixes hidden color option for marking unread entries. Unread menu entries did use `colorStatusIconTint` instead of `colorUnreadIndicator` (thanks @tchek)
|
||||||
|
- Workaround for not displaying status bar highlight color in macOS 11.0 (issue #7)
|
||||||
|
|
||||||
|
|
||||||
|
## [1.1.1] – 2020-08-31
|
||||||
|
### Fixed
|
||||||
|
- Feed indices weren't updated properly which resulted in empty feed menus (issue: #6)
|
||||||
|
|
||||||
|
|
||||||
|
## [1.1.0] – 2020-01-17
|
||||||
|
### Added
|
||||||
|
- *QuickLook*: Thumbnail previews for OPML files (QLOPML v1.3)
|
||||||
|
- *Status Bar Menu*: Tint menu bar icon with Accent color (macOS 10.14+)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Resolved Xcode warnings in Xcode 11
|
||||||
|
|
||||||
|
|
||||||
|
## [1.0.2] – 2019-10-25
|
||||||
### Fixed
|
### Fixed
|
||||||
- *Status Bar Menu*: Preferences could not be opened on macOS 10.15
|
- *Status Bar Menu*: Preferences could not be opened on macOS 10.15
|
||||||
- *Status Bar Menu*: Menu flickering resulting in a hang on macOS 10.15
|
- *Status Bar Menu*: Menu flickering resulting in a hang on macOS 10.15
|
||||||
- *UI*: Text color in `About` tab
|
- *UI*: Text color in `About` tab
|
||||||
|
|
||||||
|
|
||||||
## [1.0.1] - 2019-10-04
|
## [1.0.1] – 2019-10-04
|
||||||
### Fixed
|
### Fixed
|
||||||
- Crash on macOS 10.14 due to a `CGColorRef` null pointer
|
- Crash on macOS 10.14 due to a `CGColorRef` null pointer
|
||||||
|
|
||||||
|
|
||||||
## [1.0.0] - 2019-10-03
|
## [1.0.0] – 2019-10-03
|
||||||
### Added
|
### Added
|
||||||
- App Signing
|
- App Signing
|
||||||
- Sandboxing & hardened runtime environment
|
- Sandboxing & hardened runtime environment
|
||||||
@@ -77,7 +122,7 @@ and this project does adhere to [Semantic Versioning](https://semver.org/spec/v2
|
|||||||
- *UI:* Mark unread articles with blue dot, instead of tick mark
|
- *UI:* Mark unread articles with blue dot, instead of tick mark
|
||||||
|
|
||||||
|
|
||||||
## [0.9.4] - 2019-04-02
|
## [0.9.4] – 2019-04-02
|
||||||
### Fixed
|
### Fixed
|
||||||
- Article order got mixed up for some feeds (issue: #4)
|
- Article order got mixed up for some feeds (issue: #4)
|
||||||
- If multiple consecutive items reappear in the middle of the feed mark them read
|
- If multiple consecutive items reappear in the middle of the feed mark them read
|
||||||
@@ -86,7 +131,7 @@ and this project does adhere to [Semantic Versioning](https://semver.org/spec/v2
|
|||||||
- *UI:* Removed checkbox `Start on login`. Use Preferences > Users > Login Items instead.
|
- *UI:* Removed checkbox `Start on login`. Use Preferences > Users > Login Items instead.
|
||||||
|
|
||||||
|
|
||||||
## [0.9.3] - 2019-03-14
|
## [0.9.3] – 2019-03-14
|
||||||
### Added
|
### Added
|
||||||
- Changelog
|
- Changelog
|
||||||
- *UI:* Show body tag in article tooltip if abstract tag is empty
|
- *UI:* Show body tag in article tooltip if abstract tag is empty
|
||||||
@@ -96,7 +141,7 @@ and this project does adhere to [Semantic Versioning](https://semver.org/spec/v2
|
|||||||
- Fixed update for feeds where all article URLs point to the same resource (issue: #3)
|
- Fixed update for feeds where all article URLs point to the same resource (issue: #3)
|
||||||
|
|
||||||
|
|
||||||
## [0.9.2] - 2019-03-07
|
## [0.9.2] – 2019-03-07
|
||||||
### Added
|
### Added
|
||||||
- Limit number of articles that are displayed in feed menu (issue: #2)
|
- Limit number of articles that are displayed in feed menu (issue: #2)
|
||||||
|
|
||||||
@@ -106,7 +151,7 @@ and this project does adhere to [Semantic Versioning](https://semver.org/spec/v2
|
|||||||
- libxml2 will ignore lower ascii characters (`0x00`–`0x1F`)
|
- libxml2 will ignore lower ascii characters (`0x00`–`0x1F`)
|
||||||
|
|
||||||
|
|
||||||
## [0.9.1] - 2019-02-14
|
## [0.9.1] – 2019-02-14
|
||||||
### Added
|
### Added
|
||||||
- Mark single article as un/read (hold down option key and click on article)
|
- Mark single article as un/read (hold down option key and click on article)
|
||||||
|
|
||||||
@@ -124,11 +169,18 @@ and this project does adhere to [Semantic Versioning](https://semver.org/spec/v2
|
|||||||
- Remove html tags from abstract on save (not on display)
|
- Remove html tags from abstract on save (not on display)
|
||||||
|
|
||||||
|
|
||||||
## [0.9] - 2019-02-11
|
## [0.9] – 2019-02-11
|
||||||
Initial release
|
Initial release
|
||||||
|
|
||||||
|
|
||||||
[Unreleased]: https://github.com/relikd/baRSS/compare/v1.0.2...HEAD
|
[Unreleased]: https://github.com/relikd/baRSS/compare/v1.2.2...HEAD
|
||||||
|
[1.2.2]: https://github.com/relikd/baRSS/compare/v1.2.1...v1.2.2
|
||||||
|
[1.2.1]: https://github.com/relikd/baRSS/compare/v1.2.0...v1.2.1
|
||||||
|
[1.2.0]: https://github.com/relikd/baRSS/compare/v1.1.3...v1.2.0
|
||||||
|
[1.1.3]: https://github.com/relikd/baRSS/compare/v1.1.2...v1.1.3
|
||||||
|
[1.1.2]: https://github.com/relikd/baRSS/compare/v1.1.1...v1.1.2
|
||||||
|
[1.1.1]: https://github.com/relikd/baRSS/compare/v1.1.0...v1.1.1
|
||||||
|
[1.1.0]: https://github.com/relikd/baRSS/compare/v1.0.2...v1.1.0
|
||||||
[1.0.2]: https://github.com/relikd/baRSS/compare/v1.0.1...v1.0.2
|
[1.0.2]: https://github.com/relikd/baRSS/compare/v1.0.1...v1.0.2
|
||||||
[1.0.1]: https://github.com/relikd/baRSS/compare/v1.0.0...v1.0.1
|
[1.0.1]: https://github.com/relikd/baRSS/compare/v1.0.0...v1.0.1
|
||||||
[1.0.0]: https://github.com/relikd/baRSS/compare/v0.9.4...v1.0.0
|
[1.0.0]: https://github.com/relikd/baRSS/compare/v0.9.4...v1.0.0
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
github "relikd/RSXML2" "v2.0.0"
|
|
||||||
22
LICENSE
22
LICENSE
@@ -1,7 +1,21 @@
|
|||||||
Copyright 2018 Oleg Geier
|
MIT License
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Copyright (c) 2018 relikd
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|||||||
46
README.md
46
README.md
@@ -42,18 +42,20 @@ Go to [releases](https://github.com/relikd/baRSS/releases) and downloaded the la
|
|||||||
Searching for the App Store release? Read this [notice](#app-store-notice).
|
Searching for the App Store release? Read this [notice](#app-store-notice).
|
||||||
|
|
||||||
### Build from source
|
### Build from source
|
||||||
You'll need Xcode and [Carthage](https://github.com/Carthage/Carthage#installing-carthage).
|
You'll need Xcode, [RSXML2] \(required), and [QLOPML] \(optional).
|
||||||
The latter is optional, you can build the [RSXML2] library from source instead.
|
|
||||||
Carthage just makes it more convenient.
|
```sh
|
||||||
Download and unzip this project, navigate to the root folder and run `carthage bootstrap --platform macOS`.
|
git clone https://github.com/relikd/baRSS
|
||||||
|
git clone https://github.com/relikd/RSXML2
|
||||||
|
git clone https://github.com/relikd/QLOPML
|
||||||
|
```
|
||||||
|
|
||||||
Next, you need to clone [QLOPML](https://github.com/relikd/QLOPML) in the same folder where this project is.
|
|
||||||
Alternatively, you can simply delete the `QLOPML` project reference without much harm.
|
Alternatively, you can simply delete the `QLOPML` project reference without much harm.
|
||||||
`QLOPML` is a Quick Look plugin for `.opml` files.
|
`QLOPML` is a Quick Look plugin for `.opml` files.
|
||||||
It will display the file contents whenever you hit spacebar.
|
It will display the file contents whenever you hit spacebar.
|
||||||
|
|
||||||
That's it.
|
That's it.
|
||||||
Open Xcode and build the project.
|
Open `baRSS/baRSS.xcodeproj` and build the project.
|
||||||
Note, there are some compiler flags that append 'beta' to the development release.
|
Note, there are some compiler flags that append 'beta' to the development release.
|
||||||
If you prefer the optimized release version go to `Product > Archive`.
|
If you prefer the optimized release version go to `Product > Archive`.
|
||||||
|
|
||||||
@@ -62,12 +64,12 @@ If you prefer the optimized release version go to `Product > Archive`.
|
|||||||
Hidden options
|
Hidden options
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
This listing contains of options that have no UI that can be configured.
|
The following options have no UI equivalent and must be configured in Terminal.
|
||||||
Most likely, you wouldn't ever stumble upon these if not reading this chapter.
|
Most likely, you will never stumble upon these if not reading this chapter.
|
||||||
**Note:** To reset an option run `defaults delete de.relikd.baRSS {KEY}`, where `{KEY}` is an option from below.
|
**Note:** To reset an option run `defaults delete de.relikd.baRSS {KEY}`, where `{KEY}` is an option from below.
|
||||||
|
|
||||||
|
|
||||||
1. If you hold down the option key and click on an article item, you can mark a single item (un-)read.
|
1. If you hold down the option key and click on an article item, you can mark a single item (un-)read without opening it.
|
||||||
|
|
||||||
2. When holding down the option key, the menu will show an item to open only a few unread items at a time.
|
2. When holding down the option key, the menu will show an item to open only a few unread items at a time.
|
||||||
This number can be changed with the following Terminal command (default: 10):
|
This number can be changed with the following Terminal command (default: 10):
|
||||||
@@ -83,13 +85,13 @@ defaults write de.relikd.baRSS shortArticleNamesLimit -int 50
|
|||||||
```
|
```
|
||||||
|
|
||||||
4. Limit the number of displayed articles per feed menu.
|
4. Limit the number of displayed articles per feed menu.
|
||||||
**Note:** displayed unread count may be different than the unread items inside ('Open unread' will open hidden items too).
|
**Note:** displayed unread count may be different than the unread items inside. 'Open all unread' will open hidden items too.
|
||||||
```
|
```
|
||||||
defaults write de.relikd.baRSS articlesInMenuLimit -int 40
|
defaults write de.relikd.baRSS articlesInMenuLimit -int 40
|
||||||
```
|
```
|
||||||
|
|
||||||
5. You can change the appearance of colors throughout the application.
|
5. You can change the appearance of colors throughout the application.
|
||||||
E.g., The tint color of the menu bar icon and the color of the blue dot of unread articles.
|
E.g., The tint color of the menu bar icon and the color of the blue unread articles dot.
|
||||||
```
|
```
|
||||||
defaults write de.relikd.baRSS colorStatusIconTint -string "#37F"
|
defaults write de.relikd.baRSS colorStatusIconTint -string "#37F"
|
||||||
defaults write de.relikd.baRSS colorUnreadIndicator -string "#FBA33A"
|
defaults write de.relikd.baRSS colorUnreadIndicator -string "#FBA33A"
|
||||||
@@ -106,9 +108,9 @@ ToDo
|
|||||||
----
|
----
|
||||||
|
|
||||||
The following list is not exhaustive but rather a collection of nice things that will be added eventually.
|
The following list is not exhaustive but rather a collection of nice things that will be added eventually.
|
||||||
I may postpone some until demand increases …
|
I will postpone the development until demand increases …
|
||||||
|
|
||||||
- [ ] Localizations
|
- [ ] Localizations
|
||||||
- [ ] Feed generator for websites without feeds
|
- [ ] Feed generator for websites without feeds
|
||||||
- [ ] Automatically choose best update interval (e.g., avg)
|
- [ ] Automatically choose best update interval (e.g., avg)
|
||||||
- [ ] Sync with online services
|
- [ ] Sync with online services
|
||||||
@@ -132,14 +134,6 @@ FAQ / Q&A
|
|||||||
|
|
||||||
### App Store Notice
|
### App Store Notice
|
||||||
|
|
||||||
In the last couple of months I prepared baRSS to be released on the App Store.
|
|
||||||
With sandboxing enabled and hardened runtime environment, etc.
|
|
||||||
|
|
||||||
But, for the time being, I decided to not publish this app for political reasons.
|
|
||||||
I was not happy about some decisions made in the last weeks.
|
|
||||||
Decisions that were evaluated on monetary aspects and not on ethical considerations.
|
|
||||||
I won't support this conduct with my own money.
|
|
||||||
|
|
||||||
If you find this app somewhere on the App Store, you can be sure that it is a counterfeit.
|
If you find this app somewhere on the App Store, you can be sure that it is a counterfeit.
|
||||||
As long as you can read this very notice, I am not responsible for the publication.
|
As long as you can read this very notice, I am not responsible for the publication.
|
||||||
Further, I can't guarantee the App Store version wasn't modified by a malicious actor to spy on you.
|
Further, I can't guarantee the App Store version wasn't modified by a malicious actor to spy on you.
|
||||||
@@ -148,7 +142,7 @@ Further, I can't guarantee the App Store version wasn't modified by a malicious
|
|||||||
### Why create something that already existed?
|
### Why create something that already existed?
|
||||||
|
|
||||||
First, open source is awesome!
|
First, open source is awesome!
|
||||||
Secondly, RSS Menu made some design decisions I didn't like.
|
Second, RSS Menu made some design decisions I didn't like.
|
||||||
For example, the new integrated browser window.
|
For example, the new integrated browser window.
|
||||||
|
|
||||||
One thing I liked most, was the fact that feeds were opened in the default browser.
|
One thing I liked most, was the fact that feeds were opened in the default browser.
|
||||||
@@ -156,7 +150,7 @@ Not like 99% of the other feed readers on the market that show a separate HTML v
|
|||||||
No rendering issues, no broken links, no content that is different from the actual news article.
|
No rendering issues, no broken links, no content that is different from the actual news article.
|
||||||
|
|
||||||
I know, the whole purpose of RSS is to deliver content without the need of opening a webpage.
|
I know, the whole purpose of RSS is to deliver content without the need of opening a webpage.
|
||||||
But for me RSS is more about being informed whenever a blog or news feed has some updated content.
|
But for me RSS is more about being informed whenever a blog or news feed has updated content.
|
||||||
E.g, subscribing to video channels without having to have an account.
|
E.g, subscribing to video channels without having to have an account.
|
||||||
|
|
||||||
|
|
||||||
@@ -173,15 +167,17 @@ But on the other hand, now it is macOS 10.12 compatible.
|
|||||||
|
|
||||||
### 3rd Party Libraries
|
### 3rd Party Libraries
|
||||||
|
|
||||||
This project uses a modified version of Brent Simmons' [RSXML](https://github.com/brentsimmons/RSXML) for feed parsing.
|
This project uses a modified version of Brent Simmons' [RSXML] for feed parsing.
|
||||||
[RSXML2] is licensed under a MIT license (same as this project).
|
[RSXML2] is licensed under a MIT license (same as this project).
|
||||||
|
|
||||||
|
|
||||||
##### Trivia
|
##### Trivia
|
||||||
|
|
||||||
- Start of project: __July 19, 2018__
|
- Start of project: __July 19, 2018__
|
||||||
- Estimated development time: __1953h+__
|
- Estimated development time: __1970h+__
|
||||||
- First prototype used __feedparser python__ library
|
- First prototype used __feedparser python__ library
|
||||||
|
|
||||||
|
|
||||||
|
[QLOPML]: https://github.com/relikd/QLOPML
|
||||||
[RSXML2]: https://github.com/relikd/RSXML2
|
[RSXML2]: https://github.com/relikd/RSXML2
|
||||||
|
[RSXML]: https://github.com/brentsimmons/RSXML
|
||||||
|
|||||||
@@ -14,9 +14,6 @@
|
|||||||
54209E942117325100F3B5EF /* DrawImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 54209E932117325100F3B5EF /* DrawImage.m */; };
|
54209E942117325100F3B5EF /* DrawImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 54209E932117325100F3B5EF /* DrawImage.m */; };
|
||||||
544B011A2114B41200386E5C /* ModalSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = 544B01192114B41200386E5C /* ModalSheet.m */; };
|
544B011A2114B41200386E5C /* ModalSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = 544B01192114B41200386E5C /* ModalSheet.m */; };
|
||||||
544B011D2114EE9100386E5C /* AppHook.m in Sources */ = {isa = PBXBuildFile; fileRef = 544B011C2114EE9100386E5C /* AppHook.m */; };
|
544B011D2114EE9100386E5C /* AppHook.m in Sources */ = {isa = PBXBuildFile; fileRef = 544B011C2114EE9100386E5C /* AppHook.m */; };
|
||||||
544DCCB9212A2B4D002DBC46 /* RSXML2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 544DCCB8212A2B4D002DBC46 /* RSXML2.framework */; };
|
|
||||||
544DCCBA212A2B4D002DBC46 /* RSXML2.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 544DCCB8212A2B4D002DBC46 /* RSXML2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
|
||||||
544DCCBE212A2B6F002DBC46 /* RSXML2.framework.dSYM in CopyFiles */ = {isa = PBXBuildFile; fileRef = 544DCCBD212A2B6F002DBC46 /* RSXML2.framework.dSYM */; };
|
|
||||||
54501010230E9C8600F0B165 /* FeedDownload.m in Sources */ = {isa = PBXBuildFile; fileRef = 5450100F230E9C8600F0B165 /* FeedDownload.m */; };
|
54501010230E9C8600F0B165 /* FeedDownload.m in Sources */ = {isa = PBXBuildFile; fileRef = 5450100F230E9C8600F0B165 /* FeedDownload.m */; };
|
||||||
546A6A2922C583390034E806 /* SettingsGeneralView.m in Sources */ = {isa = PBXBuildFile; fileRef = 54D857D122802309001BA1C8 /* SettingsGeneralView.m */; };
|
546A6A2922C583390034E806 /* SettingsGeneralView.m in Sources */ = {isa = PBXBuildFile; fileRef = 54D857D122802309001BA1C8 /* SettingsGeneralView.m */; };
|
||||||
546A6A2C22C584AF0034E806 /* SettingsAppearanceView.m in Sources */ = {isa = PBXBuildFile; fileRef = 546A6A2A22C584AF0034E806 /* SettingsAppearanceView.m */; };
|
546A6A2C22C584AF0034E806 /* SettingsAppearanceView.m in Sources */ = {isa = PBXBuildFile; fileRef = 546A6A2A22C584AF0034E806 /* SettingsAppearanceView.m */; };
|
||||||
@@ -25,6 +22,8 @@
|
|||||||
546FC44321189975007CC3A3 /* SettingsGeneral.m in Sources */ = {isa = PBXBuildFile; fileRef = 546FC44121189975007CC3A3 /* SettingsGeneral.m */; };
|
546FC44321189975007CC3A3 /* SettingsGeneral.m in Sources */ = {isa = PBXBuildFile; fileRef = 546FC44121189975007CC3A3 /* SettingsGeneral.m */; };
|
||||||
5477D34E21233C62002BA27F /* FeedGroup+Ext.m in Sources */ = {isa = PBXBuildFile; fileRef = 5477D34D21233C62002BA27F /* FeedGroup+Ext.m */; };
|
5477D34E21233C62002BA27F /* FeedGroup+Ext.m in Sources */ = {isa = PBXBuildFile; fileRef = 5477D34D21233C62002BA27F /* FeedGroup+Ext.m */; };
|
||||||
5478DF04225A7AE200D30C64 /* SettingsFeedsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5478DF03225A7AE200D30C64 /* SettingsFeedsView.m */; };
|
5478DF04225A7AE200D30C64 /* SettingsFeedsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5478DF03225A7AE200D30C64 /* SettingsFeedsView.m */; };
|
||||||
|
5483296C2A3CDC38000688B9 /* RSXML2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 548329652A3CDB22000688B9 /* RSXML2.framework */; };
|
||||||
|
5483296D2A3CDC38000688B9 /* RSXML2.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 548329652A3CDB22000688B9 /* RSXML2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||||
548C6D0A230C33DE003A1AAF /* NSURL+Ext.m in Sources */ = {isa = PBXBuildFile; fileRef = 548C6D09230C33DE003A1AAF /* NSURL+Ext.m */; };
|
548C6D0A230C33DE003A1AAF /* NSURL+Ext.m in Sources */ = {isa = PBXBuildFile; fileRef = 548C6D09230C33DE003A1AAF /* NSURL+Ext.m */; };
|
||||||
5491005D2331435E00858AE2 /* Download3rdParty.m in Sources */ = {isa = PBXBuildFile; fileRef = 5491005C2331435E00858AE2 /* Download3rdParty.m */; };
|
5491005D2331435E00858AE2 /* Download3rdParty.m in Sources */ = {isa = PBXBuildFile; fileRef = 5491005C2331435E00858AE2 /* Download3rdParty.m */; };
|
||||||
54910067233A4D4000858AE2 /* URLScheme.m in Sources */ = {isa = PBXBuildFile; fileRef = 54910066233A4D4000858AE2 /* URLScheme.m */; };
|
54910067233A4D4000858AE2 /* URLScheme.m in Sources */ = {isa = PBXBuildFile; fileRef = 54910066233A4D4000858AE2 /* URLScheme.m */; };
|
||||||
@@ -47,6 +46,7 @@
|
|||||||
54BF444A22D0F4F300660096 /* AppIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 54BF444922D0F4F300660096 /* AppIcon.icns */; };
|
54BF444A22D0F4F300660096 /* AppIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 54BF444922D0F4F300660096 /* AppIcon.icns */; };
|
||||||
54D55D7322E624CD00057B98 /* SettingsFeeds+DragDrop.m in Sources */ = {isa = PBXBuildFile; fileRef = 54D55D7222E624CD00057B98 /* SettingsFeeds+DragDrop.m */; };
|
54D55D7322E624CD00057B98 /* SettingsFeeds+DragDrop.m in Sources */ = {isa = PBXBuildFile; fileRef = 54D55D7222E624CD00057B98 /* SettingsFeeds+DragDrop.m */; };
|
||||||
54D857CE227C5785001BA1C8 /* RefreshStatisticsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 54D857CD227C5785001BA1C8 /* RefreshStatisticsView.m */; };
|
54D857CE227C5785001BA1C8 /* RefreshStatisticsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 54D857CD227C5785001BA1C8 /* RefreshStatisticsView.m */; };
|
||||||
|
54DD9F1323D1D6B000B1EAA6 /* NSColor+Ext.m in Sources */ = {isa = PBXBuildFile; fileRef = 54DD9F1223D1D6B000B1EAA6 /* NSColor+Ext.m */; };
|
||||||
54E3C02122EE076D006E2E24 /* opml-icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 54E3C02022EE076D006E2E24 /* opml-icon.icns */; };
|
54E3C02122EE076D006E2E24 /* opml-icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 54E3C02022EE076D006E2E24 /* opml-icon.icns */; };
|
||||||
54E4446C2329AE0600BBF481 /* NSError+Ext.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E4446B2329AE0600BBF481 /* NSError+Ext.m */; };
|
54E4446C2329AE0600BBF481 /* NSError+Ext.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E4446B2329AE0600BBF481 /* NSError+Ext.m */; };
|
||||||
54E88320211B509D00064188 /* ModalFeedEdit.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E8831E211B509D00064188 /* ModalFeedEdit.m */; };
|
54E88320211B509D00064188 /* ModalFeedEdit.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E8831E211B509D00064188 /* ModalFeedEdit.m */; };
|
||||||
@@ -58,6 +58,20 @@
|
|||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
548329642A3CDB22000688B9 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 5483295E2A3CDB22000688B9 /* RSXML2.xcodeproj */;
|
||||||
|
proxyType = 2;
|
||||||
|
remoteGlobalIDString = 84F22C0D1B52DDEA000060CE;
|
||||||
|
remoteInfo = RSXML2;
|
||||||
|
};
|
||||||
|
548329662A3CDB22000688B9 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 5483295E2A3CDB22000688B9 /* RSXML2.xcodeproj */;
|
||||||
|
proxyType = 2;
|
||||||
|
remoteGlobalIDString = 84F22C171B52DDEA000060CE;
|
||||||
|
remoteInfo = RSXML2Tests;
|
||||||
|
};
|
||||||
54A2D63722EF8193007C61F3 /* PBXContainerItemProxy */ = {
|
54A2D63722EF8193007C61F3 /* PBXContainerItemProxy */ = {
|
||||||
isa = PBXContainerItemProxy;
|
isa = PBXContainerItemProxy;
|
||||||
containerPortal = 54A2D62E22EF8183007C61F3 /* QLOPML.xcodeproj */;
|
containerPortal = 54A2D62E22EF8183007C61F3 /* QLOPML.xcodeproj */;
|
||||||
@@ -74,7 +88,7 @@
|
|||||||
dstPath = "";
|
dstPath = "";
|
||||||
dstSubfolderSpec = 10;
|
dstSubfolderSpec = 10;
|
||||||
files = (
|
files = (
|
||||||
544DCCBA212A2B4D002DBC46 /* RSXML2.framework in Embed Frameworks */,
|
5483296D2A3CDC38000688B9 /* RSXML2.framework in Embed Frameworks */,
|
||||||
);
|
);
|
||||||
name = "Embed Frameworks";
|
name = "Embed Frameworks";
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
@@ -85,7 +99,6 @@
|
|||||||
dstPath = "";
|
dstPath = "";
|
||||||
dstSubfolderSpec = 16;
|
dstSubfolderSpec = 16;
|
||||||
files = (
|
files = (
|
||||||
544DCCBE212A2B6F002DBC46 /* RSXML2.framework.dSYM in CopyFiles */,
|
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -118,8 +131,6 @@
|
|||||||
544B01192114B41200386E5C /* ModalSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModalSheet.m; sourceTree = "<group>"; };
|
544B01192114B41200386E5C /* ModalSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModalSheet.m; sourceTree = "<group>"; };
|
||||||
544B011B2114EE9100386E5C /* AppHook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppHook.h; sourceTree = "<group>"; };
|
544B011B2114EE9100386E5C /* AppHook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppHook.h; sourceTree = "<group>"; };
|
||||||
544B011C2114EE9100386E5C /* AppHook.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppHook.m; sourceTree = "<group>"; };
|
544B011C2114EE9100386E5C /* AppHook.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppHook.m; sourceTree = "<group>"; };
|
||||||
544DCCB8212A2B4D002DBC46 /* RSXML2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RSXML2.framework; path = Carthage/Build/Mac/RSXML2.framework; sourceTree = "<group>"; };
|
|
||||||
544DCCBD212A2B6F002DBC46 /* RSXML2.framework.dSYM */ = {isa = PBXFileReference; lastKnownFileType = wrapper.dsym; name = RSXML2.framework.dSYM; path = Carthage/Build/Mac/RSXML2.framework.dSYM; sourceTree = "<group>"; };
|
|
||||||
5450100E230E9C8600F0B165 /* FeedDownload.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FeedDownload.h; sourceTree = "<group>"; };
|
5450100E230E9C8600F0B165 /* FeedDownload.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FeedDownload.h; sourceTree = "<group>"; };
|
||||||
5450100F230E9C8600F0B165 /* FeedDownload.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FeedDownload.m; sourceTree = "<group>"; };
|
5450100F230E9C8600F0B165 /* FeedDownload.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FeedDownload.m; sourceTree = "<group>"; };
|
||||||
546A6A2A22C584AF0034E806 /* SettingsAppearanceView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingsAppearanceView.m; sourceTree = "<group>"; };
|
546A6A2A22C584AF0034E806 /* SettingsAppearanceView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingsAppearanceView.m; sourceTree = "<group>"; };
|
||||||
@@ -134,6 +145,7 @@
|
|||||||
5477D34D21233C62002BA27F /* FeedGroup+Ext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "FeedGroup+Ext.m"; sourceTree = "<group>"; };
|
5477D34D21233C62002BA27F /* FeedGroup+Ext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "FeedGroup+Ext.m"; sourceTree = "<group>"; };
|
||||||
5478DF02225A7AE200D30C64 /* SettingsFeedsView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SettingsFeedsView.h; sourceTree = "<group>"; };
|
5478DF02225A7AE200D30C64 /* SettingsFeedsView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SettingsFeedsView.h; sourceTree = "<group>"; };
|
||||||
5478DF03225A7AE200D30C64 /* SettingsFeedsView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SettingsFeedsView.m; sourceTree = "<group>"; };
|
5478DF03225A7AE200D30C64 /* SettingsFeedsView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SettingsFeedsView.m; sourceTree = "<group>"; };
|
||||||
|
5483295E2A3CDB22000688B9 /* RSXML2.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RSXML2.xcodeproj; path = ../RSXML2/RSXML2.xcodeproj; sourceTree = "<group>"; };
|
||||||
54892F1D2235285700271CBA /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
|
54892F1D2235285700271CBA /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
|
||||||
548C6D08230C33DE003A1AAF /* NSURL+Ext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSURL+Ext.h"; sourceTree = "<group>"; };
|
548C6D08230C33DE003A1AAF /* NSURL+Ext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSURL+Ext.h"; sourceTree = "<group>"; };
|
||||||
548C6D09230C33DE003A1AAF /* NSURL+Ext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSURL+Ext.m"; sourceTree = "<group>"; };
|
548C6D09230C33DE003A1AAF /* NSURL+Ext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSURL+Ext.m"; sourceTree = "<group>"; };
|
||||||
@@ -181,6 +193,8 @@
|
|||||||
54D857CD227C5785001BA1C8 /* RefreshStatisticsView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RefreshStatisticsView.m; sourceTree = "<group>"; };
|
54D857CD227C5785001BA1C8 /* RefreshStatisticsView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RefreshStatisticsView.m; sourceTree = "<group>"; };
|
||||||
54D857D022802309001BA1C8 /* SettingsGeneralView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SettingsGeneralView.h; sourceTree = "<group>"; };
|
54D857D022802309001BA1C8 /* SettingsGeneralView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SettingsGeneralView.h; sourceTree = "<group>"; };
|
||||||
54D857D122802309001BA1C8 /* SettingsGeneralView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SettingsGeneralView.m; sourceTree = "<group>"; };
|
54D857D122802309001BA1C8 /* SettingsGeneralView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SettingsGeneralView.m; sourceTree = "<group>"; };
|
||||||
|
54DD9F1123D1D6B000B1EAA6 /* NSColor+Ext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSColor+Ext.h"; sourceTree = "<group>"; };
|
||||||
|
54DD9F1223D1D6B000B1EAA6 /* NSColor+Ext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSColor+Ext.m"; sourceTree = "<group>"; };
|
||||||
54E3C02022EE076D006E2E24 /* opml-icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "opml-icon.icns"; sourceTree = "<group>"; };
|
54E3C02022EE076D006E2E24 /* opml-icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "opml-icon.icns"; sourceTree = "<group>"; };
|
||||||
54E4446A2329AE0600BBF481 /* NSError+Ext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSError+Ext.h"; sourceTree = "<group>"; };
|
54E4446A2329AE0600BBF481 /* NSError+Ext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSError+Ext.h"; sourceTree = "<group>"; };
|
||||||
54E4446B2329AE0600BBF481 /* NSError+Ext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSError+Ext.m"; sourceTree = "<group>"; };
|
54E4446B2329AE0600BBF481 /* NSError+Ext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSError+Ext.m"; sourceTree = "<group>"; };
|
||||||
@@ -201,7 +215,7 @@
|
|||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
544DCCB9212A2B4D002DBC46 /* RSXML2.framework in Frameworks */,
|
5483296C2A3CDC38000688B9 /* RSXML2.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -226,10 +240,8 @@
|
|||||||
544936F721F1E51E00DEE9AA /* NSCategories */ = {
|
544936F721F1E51E00DEE9AA /* NSCategories */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
54B517052270E8C6006C1B29 /* NSView+Ext.h */,
|
54DD9F1123D1D6B000B1EAA6 /* NSColor+Ext.h */,
|
||||||
54B517062270E92A006C1B29 /* NSView+Ext.m */,
|
54DD9F1223D1D6B000B1EAA6 /* NSColor+Ext.m */,
|
||||||
54AD4E0A2301853D000AE386 /* NSString+Ext.h */,
|
|
||||||
54AD4E0B2301853D000AE386 /* NSString+Ext.m */,
|
|
||||||
54BB048721FD2AB500C303A5 /* NSDate+Ext.h */,
|
54BB048721FD2AB500C303A5 /* NSDate+Ext.h */,
|
||||||
54BB048821FD2AB500C303A5 /* NSDate+Ext.m */,
|
54BB048821FD2AB500C303A5 /* NSDate+Ext.m */,
|
||||||
54E4446A2329AE0600BBF481 /* NSError+Ext.h */,
|
54E4446A2329AE0600BBF481 /* NSError+Ext.h */,
|
||||||
@@ -238,19 +250,14 @@
|
|||||||
548C6D09230C33DE003A1AAF /* NSURL+Ext.m */,
|
548C6D09230C33DE003A1AAF /* NSURL+Ext.m */,
|
||||||
54B6F14C23155E1A002C94C9 /* NSURLRequest+Ext.h */,
|
54B6F14C23155E1A002C94C9 /* NSURLRequest+Ext.h */,
|
||||||
54B6F14D23155E1A002C94C9 /* NSURLRequest+Ext.m */,
|
54B6F14D23155E1A002C94C9 /* NSURLRequest+Ext.m */,
|
||||||
|
54AD4E0A2301853D000AE386 /* NSString+Ext.h */,
|
||||||
|
54AD4E0B2301853D000AE386 /* NSString+Ext.m */,
|
||||||
|
54B517052270E8C6006C1B29 /* NSView+Ext.h */,
|
||||||
|
54B517062270E92A006C1B29 /* NSView+Ext.m */,
|
||||||
);
|
);
|
||||||
path = NSCategories;
|
path = NSCategories;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
544FBD4321064AEB008A260C /* Frameworks */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
544DCCB8212A2B4D002DBC46 /* RSXML2.framework */,
|
|
||||||
544DCCBD212A2B6F002DBC46 /* RSXML2.framework.dSYM */,
|
|
||||||
);
|
|
||||||
name = Frameworks;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
546FC44D2118B357007CC3A3 /* Preferences */ = {
|
546FC44D2118B357007CC3A3 /* Preferences */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@@ -266,6 +273,15 @@
|
|||||||
path = Preferences;
|
path = Preferences;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
5483295F2A3CDB22000688B9 /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
548329652A3CDB22000688B9 /* RSXML2.framework */,
|
||||||
|
548329672A3CDB22000688B9 /* RSXML2Tests.xctest */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
54A07A8322105E0800082C51 /* Core Data */ = {
|
54A07A8322105E0800082C51 /* Core Data */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@@ -300,8 +316,8 @@
|
|||||||
54892F1D2235285700271CBA /* CHANGELOG.md */,
|
54892F1D2235285700271CBA /* CHANGELOG.md */,
|
||||||
54ACC27E21061B3B0020715F /* baRSS */,
|
54ACC27E21061B3B0020715F /* baRSS */,
|
||||||
54A2D62E22EF8183007C61F3 /* QLOPML.xcodeproj */,
|
54A2D62E22EF8183007C61F3 /* QLOPML.xcodeproj */,
|
||||||
|
5483295E2A3CDB22000688B9 /* RSXML2.xcodeproj */,
|
||||||
54ACC27D21061B3B0020715F /* Products */,
|
54ACC27D21061B3B0020715F /* Products */,
|
||||||
544FBD4321064AEB008A260C /* Frameworks */,
|
|
||||||
);
|
);
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
@@ -457,7 +473,7 @@
|
|||||||
54ACC27421061B3B0020715F /* Project object */ = {
|
54ACC27421061B3B0020715F /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 0940;
|
LastUpgradeCheck = 1200;
|
||||||
ORGANIZATIONNAME = relikd;
|
ORGANIZATIONNAME = relikd;
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
54ACC27B21061B3B0020715F = {
|
54ACC27B21061B3B0020715F = {
|
||||||
@@ -493,6 +509,10 @@
|
|||||||
ProductGroup = 54A2D63422EF8193007C61F3 /* Products */;
|
ProductGroup = 54A2D63422EF8193007C61F3 /* Products */;
|
||||||
ProjectRef = 54A2D62E22EF8183007C61F3 /* QLOPML.xcodeproj */;
|
ProjectRef = 54A2D62E22EF8183007C61F3 /* QLOPML.xcodeproj */;
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
ProductGroup = 5483295F2A3CDB22000688B9 /* Products */;
|
||||||
|
ProjectRef = 5483295E2A3CDB22000688B9 /* RSXML2.xcodeproj */;
|
||||||
|
},
|
||||||
);
|
);
|
||||||
projectRoot = "";
|
projectRoot = "";
|
||||||
targets = (
|
targets = (
|
||||||
@@ -502,6 +522,20 @@
|
|||||||
/* End PBXProject section */
|
/* End PBXProject section */
|
||||||
|
|
||||||
/* Begin PBXReferenceProxy section */
|
/* Begin PBXReferenceProxy section */
|
||||||
|
548329652A3CDB22000688B9 /* RSXML2.framework */ = {
|
||||||
|
isa = PBXReferenceProxy;
|
||||||
|
fileType = wrapper.framework;
|
||||||
|
path = RSXML2.framework;
|
||||||
|
remoteRef = 548329642A3CDB22000688B9 /* PBXContainerItemProxy */;
|
||||||
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
|
};
|
||||||
|
548329672A3CDB22000688B9 /* RSXML2Tests.xctest */ = {
|
||||||
|
isa = PBXReferenceProxy;
|
||||||
|
fileType = wrapper.cfbundle;
|
||||||
|
path = RSXML2Tests.xctest;
|
||||||
|
remoteRef = 548329662A3CDB22000688B9 /* PBXContainerItemProxy */;
|
||||||
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
|
};
|
||||||
54A2D63822EF8193007C61F3 /* QLOPML.qlgenerator */ = {
|
54A2D63822EF8193007C61F3 /* QLOPML.qlgenerator */ = {
|
||||||
isa = PBXReferenceProxy;
|
isa = PBXReferenceProxy;
|
||||||
fileType = wrapper.cfbundle;
|
fileType = wrapper.cfbundle;
|
||||||
@@ -577,6 +611,7 @@
|
|||||||
544B011D2114EE9100386E5C /* AppHook.m in Sources */,
|
544B011D2114EE9100386E5C /* AppHook.m in Sources */,
|
||||||
546FC44321189975007CC3A3 /* SettingsGeneral.m in Sources */,
|
546FC44321189975007CC3A3 /* SettingsGeneral.m in Sources */,
|
||||||
546A6A2922C583390034E806 /* SettingsGeneralView.m in Sources */,
|
546A6A2922C583390034E806 /* SettingsGeneralView.m in Sources */,
|
||||||
|
54DD9F1323D1D6B000B1EAA6 /* NSColor+Ext.m in Sources */,
|
||||||
54ACC29521061E270020715F /* UpdateScheduler.m in Sources */,
|
54ACC29521061E270020715F /* UpdateScheduler.m in Sources */,
|
||||||
54BB048921FD2AB500C303A5 /* NSDate+Ext.m in Sources */,
|
54BB048921FD2AB500C303A5 /* NSDate+Ext.m in Sources */,
|
||||||
5477D34E21233C62002BA27F /* FeedGroup+Ext.m in Sources */,
|
5477D34E21233C62002BA27F /* FeedGroup+Ext.m in Sources */,
|
||||||
@@ -641,6 +676,7 @@
|
|||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
@@ -696,6 +732,7 @@
|
|||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
@@ -746,7 +783,6 @@
|
|||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)",
|
"$(PROJECT_DIR)",
|
||||||
"$(PROJECT_DIR)/Carthage/Build/Mac",
|
|
||||||
);
|
);
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
"APP_NAME=\"\\@\\\"$(PRODUCT_NAME)\\\"\"",
|
"APP_NAME=\"\\@\\\"$(PRODUCT_NAME)\\\"\"",
|
||||||
@@ -801,7 +837,6 @@
|
|||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)",
|
"$(PROJECT_DIR)",
|
||||||
"$(PROJECT_DIR)/Carthage/Build/Mac",
|
|
||||||
);
|
);
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
"APP_NAME=\"\\@\\\"$(PRODUCT_NAME)\\\"\"",
|
"APP_NAME=\"\\@\\\"$(PRODUCT_NAME)\\\"\"",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1000"
|
LastUpgradeVersion = "1240"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
@@ -27,8 +27,6 @@
|
|||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
<Testables>
|
|
||||||
</Testables>
|
|
||||||
<MacroExpansion>
|
<MacroExpansion>
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
@@ -38,8 +36,8 @@
|
|||||||
ReferencedContainer = "container:baRSS.xcodeproj">
|
ReferencedContainer = "container:baRSS.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</MacroExpansion>
|
</MacroExpansion>
|
||||||
<AdditionalOptions>
|
<Testables>
|
||||||
</AdditionalOptions>
|
</Testables>
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
@@ -49,7 +47,7 @@
|
|||||||
useCustomWorkingDirectory = "NO"
|
useCustomWorkingDirectory = "NO"
|
||||||
ignoresPersistentStateOnLaunch = "NO"
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
debugDocumentVersioning = "YES"
|
debugDocumentVersioning = "YES"
|
||||||
stopOnEveryMainThreadCheckerIssue = "YES"
|
migratedStopOnEveryIssue = "YES"
|
||||||
debugServiceExtension = "internal"
|
debugServiceExtension = "internal"
|
||||||
allowLocationSimulation = "YES">
|
allowLocationSimulation = "YES">
|
||||||
<BuildableProductRunnable
|
<BuildableProductRunnable
|
||||||
@@ -83,8 +81,6 @@
|
|||||||
isEnabled = "NO">
|
isEnabled = "NO">
|
||||||
</EnvironmentVariable>
|
</EnvironmentVariable>
|
||||||
</EnvironmentVariables>
|
</EnvironmentVariables>
|
||||||
<AdditionalOptions>
|
|
||||||
</AdditionalOptions>
|
|
||||||
</LaunchAction>
|
</LaunchAction>
|
||||||
<ProfileAction
|
<ProfileAction
|
||||||
buildConfiguration = "Release"
|
buildConfiguration = "Release"
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
@class BarStatusItem, Preferences;
|
@class BarStatusItem, Preferences;
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "AppHook.h"
|
#import "AppHook.h"
|
||||||
#import "DrawImage.h"
|
#import "DrawImage.h"
|
||||||
#import "UserPrefs.h"
|
#import "UserPrefs.h"
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#ifndef Constants_h
|
#ifndef Constants_h
|
||||||
#define Constants_h
|
#define Constants_h
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +1,9 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
#import "Feed+CoreDataClass.h"
|
#import "Feed+CoreDataClass.h"
|
||||||
@class RSParsedFeed;
|
@class RSParsedFeed;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface Feed (Ext)
|
@interface Feed (Ext)
|
||||||
@property (readonly) BOOL hasIcon;
|
@property (readonly) BOOL hasIcon;
|
||||||
@property (nonnull, readonly) NSImage* iconImage16;
|
@property (nonnull, readonly) NSImage* iconImage16;
|
||||||
@@ -36,5 +16,7 @@
|
|||||||
- (void)calculateAndSetIndexPathString;
|
- (void)calculateAndSetIndexPathString;
|
||||||
- (void)setNewIcon:(NSURL*)location;
|
- (void)setNewIcon:(NSURL*)location;
|
||||||
// Article properties
|
// Article properties
|
||||||
- (NSArray<FeedArticle*>*)sortedArticles;
|
- (nullable NSArray<FeedArticle*>*)sortedArticles;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import RSXML2;
|
@import RSXML2;
|
||||||
#import "Feed+Ext.h"
|
#import "Feed+Ext.h"
|
||||||
#import "Constants.h"
|
#import "Constants.h"
|
||||||
@@ -50,7 +28,13 @@
|
|||||||
- (NSMenuItem*)newMenuItem {
|
- (NSMenuItem*)newMenuItem {
|
||||||
NSMenuItem *item = [NSMenuItem new];
|
NSMenuItem *item = [NSMenuItem new];
|
||||||
item.title = self.group.anyName;
|
item.title = self.group.anyName;
|
||||||
item.toolTip = self.subtitle;
|
// Tooltip disabled (feed-group only) because it causes issues on macOS Ventura.
|
||||||
|
// Menu opens invisibly (OrderNSWindow: unsupported window ordering op -1)
|
||||||
|
// steps to reproduce:
|
||||||
|
// 1. hover over a feed-group menu item until tooltip pops up
|
||||||
|
// 2. hover over another feed with tooltip
|
||||||
|
// 3. go back to previous feed.
|
||||||
|
// item.toolTip = self.subtitle;
|
||||||
item.enabled = (self.articles.count > 0);
|
item.enabled = (self.articles.count > 0);
|
||||||
item.image = self.iconImage16;
|
item.image = self.iconImage16;
|
||||||
item.representedObject = self.indexPath;
|
item.representedObject = self.indexPath;
|
||||||
@@ -146,7 +130,7 @@
|
|||||||
/**
|
/**
|
||||||
@return Articles sorted by attribute @c sortIndex with descending order (newest items first).
|
@return Articles sorted by attribute @c sortIndex with descending order (newest items first).
|
||||||
*/
|
*/
|
||||||
- (NSArray<FeedArticle*>*)sortedArticles {
|
- (nullable NSArray<FeedArticle*>*)sortedArticles {
|
||||||
if (self.articles.count == 0)
|
if (self.articles.count == 0)
|
||||||
return nil;
|
return nil;
|
||||||
return [self.articles sortedArrayUsingDescriptors:@[[NSSortDescriptor sortDescriptorWithKey:@"sortIndex" ascending:NO]]];
|
return [self.articles sortedArrayUsingDescriptors:@[[NSSortDescriptor sortDescriptorWithKey:@"sortIndex" ascending:NO]]];
|
||||||
@@ -196,7 +180,8 @@
|
|||||||
if (self.articles.count == 0) {
|
if (self.articles.count == 0) {
|
||||||
img = [NSImage imageNamed:NSImageNameCaution];
|
img = [NSImage imageNamed:NSImageNameCaution];
|
||||||
} else if (self.hasIcon) {
|
} else if (self.hasIcon) {
|
||||||
img = [[NSImage alloc] initByReferencingURL:[self iconPath]];
|
NSData* data = [[NSData alloc] initWithContentsOfURL:[self iconPath]];
|
||||||
|
img = [[NSImage alloc] initWithData:data];
|
||||||
} else {
|
} else {
|
||||||
img = [NSImage imageNamed:RSSImageDefaultRSSIcon];
|
img = [NSImage imageNamed:RSSImageDefaultRSSIcon];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,30 +1,12 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
#import "FeedArticle+CoreDataClass.h"
|
#import "FeedArticle+CoreDataClass.h"
|
||||||
@class RSParsedArticle;
|
@class RSParsedArticle;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface FeedArticle (Ext)
|
@interface FeedArticle (Ext)
|
||||||
+ (instancetype)newArticle:(RSParsedArticle*)entry inContext:(NSManagedObjectContext*)moc;
|
+ (instancetype)newArticle:(RSParsedArticle*)entry inContext:(NSManagedObjectContext*)moc;
|
||||||
- (NSMenuItem*)newMenuItem;
|
- (NSMenuItem*)newMenuItem;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import RSXML2.RSParsedArticle;
|
@import RSXML2.RSParsedArticle;
|
||||||
#import "FeedArticle+Ext.h"
|
#import "FeedArticle+Ext.h"
|
||||||
#import "Constants.h"
|
#import "Constants.h"
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
#import "FeedGroup+CoreDataClass.h"
|
#import "FeedGroup+CoreDataClass.h"
|
||||||
|
|
||||||
@@ -29,6 +7,7 @@ typedef NS_ENUM(int16_t, FeedGroupType) {
|
|||||||
GROUP = 0, FEED = 1, SEPARATOR = 2
|
GROUP = 0, FEED = 1, SEPARATOR = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface FeedGroup (Ext)
|
@interface FeedGroup (Ext)
|
||||||
/// Overwrites @c type attribute with enum. Use one of: @c GROUP, @c FEED, @c SEPARATOR.
|
/// Overwrites @c type attribute with enum. Use one of: @c GROUP, @c FEED, @c SEPARATOR.
|
||||||
@@ -39,14 +18,16 @@ typedef NS_ENUM(int16_t, FeedGroupType) {
|
|||||||
|
|
||||||
+ (instancetype)newGroup:(FeedGroupType)type inContext:(NSManagedObjectContext*)context;
|
+ (instancetype)newGroup:(FeedGroupType)type inContext:(NSManagedObjectContext*)context;
|
||||||
+ (instancetype)appendToRoot:(FeedGroupType)type inContext:(NSManagedObjectContext*)moc;
|
+ (instancetype)appendToRoot:(FeedGroupType)type inContext:(NSManagedObjectContext*)moc;
|
||||||
- (void)setParent:(FeedGroup *)parent andSortIndex:(int32_t)sortIndex;
|
- (void)setParent:(nullable FeedGroup *)parent andSortIndex:(int32_t)sortIndex;
|
||||||
- (void)setSortIndexIfChanged:(int32_t)sortIndex;
|
- (void)setSortIndexIfChanged:(int32_t)sortIndex;
|
||||||
- (void)setNameIfChanged:(nullable NSString*)name;
|
- (void)setNameIfChanged:(nullable NSString*)name;
|
||||||
- (NSMenuItem*)newMenuItem;
|
- (NSMenuItem*)newMenuItem;
|
||||||
// Handle children and parents
|
// Handle children and parents
|
||||||
- (NSString*)indexPathString;
|
- (NSString*)indexPathString;
|
||||||
- (NSArray<FeedGroup*>*)sortedChildren;
|
- (nullable NSArray<FeedGroup*>*)sortedChildren;
|
||||||
- (NSMutableArray<FeedGroup*>*)allParents;
|
- (NSMutableArray<FeedGroup*>*)allParents;
|
||||||
// Printing
|
// Printing
|
||||||
- (NSString*)readableDescription;
|
- (NSString*)readableDescription;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "FeedGroup+Ext.h"
|
#import "FeedGroup+Ext.h"
|
||||||
#import "Feed+Ext.h"
|
#import "Feed+Ext.h"
|
||||||
#import "StoreCoordinator.h"
|
#import "StoreCoordinator.h"
|
||||||
@@ -78,7 +56,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Set @c parent and @c sortIndex. Also if type is @c FEED calculate and set @c indexPath string.
|
/// Set @c parent and @c sortIndex. Also if type is @c FEED calculate and set @c indexPath string.
|
||||||
- (void)setParent:(FeedGroup *)parent andSortIndex:(int32_t)sortIndex {
|
- (void)setParent:(nullable FeedGroup *)parent andSortIndex:(int32_t)sortIndex {
|
||||||
self.parent = parent;
|
self.parent = parent;
|
||||||
self.sortIndex = sortIndex;
|
self.sortIndex = sortIndex;
|
||||||
if (self.type == FEED)
|
if (self.type == FEED)
|
||||||
@@ -89,10 +67,11 @@
|
|||||||
- (void)setSortIndexIfChanged:(int32_t)sortIndex {
|
- (void)setSortIndexIfChanged:(int32_t)sortIndex {
|
||||||
if (self.sortIndex != sortIndex) {
|
if (self.sortIndex != sortIndex) {
|
||||||
self.sortIndex = sortIndex;
|
self.sortIndex = sortIndex;
|
||||||
|
}
|
||||||
|
// Otherwise move from 0.0 -> 0 will not trigger index path update
|
||||||
[self iterateSorted:NO overDescendantFeeds:^(Feed *feed, BOOL *cancel) {
|
[self iterateSorted:NO overDescendantFeeds:^(Feed *feed, BOOL *cancel) {
|
||||||
[feed calculateAndSetIndexPathString];
|
[feed calculateAndSetIndexPathString];
|
||||||
}];
|
}];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set @c name attribute but only if value differs.
|
/// Set @c name attribute but only if value differs.
|
||||||
@@ -127,7 +106,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// @return Children sorted by attribute @c sortIndex (same order as in preferences).
|
/// @return Children sorted by attribute @c sortIndex (same order as in preferences).
|
||||||
- (NSArray<FeedGroup*>*)sortedChildren {
|
- (nullable NSArray<FeedGroup*>*)sortedChildren {
|
||||||
if (self.children.count == 0)
|
if (self.children.count == 0)
|
||||||
return nil;
|
return nil;
|
||||||
return [self.children sortedArrayUsingDescriptors:@[[NSSortDescriptor sortDescriptorWithKey:@"sortIndex" ascending:YES]]];
|
return [self.children sortedArrayUsingDescriptors:@[[NSSortDescriptor sortDescriptorWithKey:@"sortIndex" ascending:YES]]];
|
||||||
|
|||||||
@@ -1,30 +1,10 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
#import "FeedMeta+CoreDataClass.h"
|
#import "FeedMeta+CoreDataClass.h"
|
||||||
|
|
||||||
static int32_t const kDefaultFeedRefreshInterval = 30 * 60;
|
static int32_t const kDefaultFeedRefreshInterval = 30 * 60;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface FeedMeta (Ext)
|
@interface FeedMeta (Ext)
|
||||||
+ (instancetype)newMetaInContext:(NSManagedObjectContext*)moc;
|
+ (instancetype)newMetaInContext:(NSManagedObjectContext*)moc;
|
||||||
// HTTP response
|
// HTTP response
|
||||||
@@ -35,3 +15,5 @@ static int32_t const kDefaultFeedRefreshInterval = 30 * 60;
|
|||||||
- (void)setRefreshIfChanged:(int32_t)refresh;
|
- (void)setRefreshIfChanged:(int32_t)refresh;
|
||||||
- (void)scheduleNow:(NSTimeInterval)future;
|
- (void)scheduleNow:(NSTimeInterval)future;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "FeedMeta+Ext.h"
|
#import "FeedMeta+Ext.h"
|
||||||
#import "Feed+Ext.h"
|
#import "Feed+Ext.h"
|
||||||
#import "FeedGroup+Ext.h"
|
#import "FeedGroup+Ext.h"
|
||||||
|
|||||||
@@ -1,27 +1,7 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface NSFetchRequest<ResultType> (Ext)
|
@interface NSFetchRequest<ResultType> (Ext)
|
||||||
// Perform core data request and fetch data
|
// Perform core data request and fetch data
|
||||||
- (NSArray<ResultType>*)fetchAllRows:(NSManagedObjectContext*)moc;
|
- (NSArray<ResultType>*)fetchAllRows:(NSManagedObjectContext*)moc;
|
||||||
@@ -37,3 +17,5 @@
|
|||||||
- (instancetype)sortDESC:(NSString*)key; // add .sortDescriptors -> ascending:NO
|
- (instancetype)sortDESC:(NSString*)key; // add .sortDescriptors -> ascending:NO
|
||||||
- (instancetype)addFunctionExpression:(NSString*)fn onKeyPath:(NSString*)keyPath name:(NSString*)name type:(NSAttributeType)type; // add .propertiesToFetch -> (expressionForFunction:@[expressionForKeyPath:])
|
- (instancetype)addFunctionExpression:(NSString*)fn onKeyPath:(NSString*)keyPath name:(NSString*)name type:(NSAttributeType)type; // add .propertiesToFetch -> (expressionForFunction:@[expressionForKeyPath:])
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "NSFetchRequest+Ext.h"
|
#import "NSFetchRequest+Ext.h"
|
||||||
#import "NSError+Ext.h"
|
#import "NSError+Ext.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +1,8 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
#import "DBv1+CoreDataModel.h"
|
#import "DBv1+CoreDataModel.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface StoreCoordinator : NSObject
|
@interface StoreCoordinator : NSObject
|
||||||
// Managing contexts
|
// Managing contexts
|
||||||
+ (NSManagedObjectContext*)getMainContext;
|
+ (NSManagedObjectContext*)getMainContext;
|
||||||
@@ -44,7 +24,7 @@
|
|||||||
+ (NSArray<NSDictionary*>*)countAggregatedUnread;
|
+ (NSArray<NSDictionary*>*)countAggregatedUnread;
|
||||||
|
|
||||||
// Get List Of Elements
|
// Get List Of Elements
|
||||||
+ (NSArray<FeedGroup*>*)sortedFeedGroupsWithParent:(id)parent inContext:(nullable NSManagedObjectContext*)moc;
|
+ (NSArray<FeedGroup*>*)sortedFeedGroupsWithParent:(nullable id)parent inContext:(nullable NSManagedObjectContext*)moc;
|
||||||
+ (Feed*)feedWithIndexPath:(nonnull NSString*)path inContext:(nullable NSManagedObjectContext*)moc;
|
+ (Feed*)feedWithIndexPath:(nonnull NSString*)path inContext:(nullable NSManagedObjectContext*)moc;
|
||||||
+ (NSString*)urlForFeedWithIndexPath:(nonnull NSString*)path;
|
+ (NSString*)urlForFeedWithIndexPath:(nonnull NSString*)path;
|
||||||
|
|
||||||
@@ -55,3 +35,5 @@
|
|||||||
+ (void)cleanupAndShowAlert:(BOOL)flag;
|
+ (void)cleanupAndShowAlert:(BOOL)flag;
|
||||||
+ (NSUInteger)cleanupFavicons;
|
+ (NSUInteger)cleanupFavicons;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "StoreCoordinator.h"
|
#import "StoreCoordinator.h"
|
||||||
#import "AppHook.h"
|
#import "AppHook.h"
|
||||||
#import "Constants.h"
|
#import "Constants.h"
|
||||||
@@ -144,7 +122,7 @@
|
|||||||
@param moc If @c nil perform requests on main context (ok for reading).
|
@param moc If @c nil perform requests on main context (ok for reading).
|
||||||
@return Sorted list of @c FeedGroup items where @c FeedGroup.parent @c = @c parent.
|
@return Sorted list of @c FeedGroup items where @c FeedGroup.parent @c = @c parent.
|
||||||
*/
|
*/
|
||||||
+ (NSArray<FeedGroup*>*)sortedFeedGroupsWithParent:(id)parent inContext:(nullable NSManagedObjectContext*)moc {
|
+ (NSArray<FeedGroup*>*)sortedFeedGroupsWithParent:(nullable id)parent inContext:(nullable NSManagedObjectContext*)moc {
|
||||||
return [[[[FeedGroup fetchRequest] where:@"parent = %@", parent] sortASC:@"sortIndex"] fetchAllRows:moc ? moc : [self getMainContext]];
|
return [[[[FeedGroup fetchRequest] where:@"parent = %@", parent] sortASC:@"sortIndex"] fetchAllRows:moc ? moc : [self getMainContext]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +1,14 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
#define ENV_LOG_YOUTUBE 1
|
#define ENV_LOG_YOUTUBE 1
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
// TODO: Make plugins extensible? community extensions.
|
// TODO: Make plugins extensible? community extensions.
|
||||||
@interface YouTubePlugin : NSObject
|
@interface YouTubePlugin : NSObject
|
||||||
+ (NSString*)feedURL:(NSURL*)url;
|
+ (nullable NSString*)feedURL:(NSURL*)url data:(NSData*)html;
|
||||||
+ (NSString*)videoImage:(NSString*)videoid;
|
+ (NSString*)videoImage:(NSString*)videoid;
|
||||||
+ (NSString*)videoImageHQ:(NSString*)videoid;
|
+ (NSString*)videoImageHQ:(NSString*)videoid;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#include "Download3rdParty.h"
|
#include "Download3rdParty.h"
|
||||||
|
|
||||||
@implementation YouTubePlugin
|
@implementation YouTubePlugin
|
||||||
@@ -33,12 +11,13 @@
|
|||||||
|
|
||||||
@return @c nil if @c url is not properly formatted, YouTube feed URL otherwise.
|
@return @c nil if @c url is not properly formatted, YouTube feed URL otherwise.
|
||||||
*/
|
*/
|
||||||
+ (NSString*)feedURL:(NSURL*)url {
|
+ (nullable NSString*)feedURL:(NSURL*)url data:(NSData*)html {
|
||||||
if (![url.host hasSuffix:@"youtube.com"]) // 'youtu.be' & 'youtube-nocookie.com' will redirect
|
if (![url.host hasSuffix:@"youtube.com"]) // 'youtu.be' & 'youtube-nocookie.com' will redirect
|
||||||
return nil;
|
return nil;
|
||||||
// https://www.youtube.com/channel/[channel-id]
|
// https://www.youtube.com/channel/[channel-id]
|
||||||
// https://www.youtube.com/user/[user-name]
|
// https://www.youtube.com/user/[user-name]
|
||||||
// https://www.youtube.com/playlist?list=[playlist-id]
|
// https://www.youtube.com/playlist?list=[playlist-id]
|
||||||
|
// https://www.youtube.com/c/[channel-name]
|
||||||
#if DEBUG && ENV_LOG_YOUTUBE
|
#if DEBUG && ENV_LOG_YOUTUBE
|
||||||
printf("resolving YouTube url:\n");
|
printf("resolving YouTube url:\n");
|
||||||
printf(" ↳ %s\n", url.absoluteString.UTF8String);
|
printf(" ↳ %s\n", url.absoluteString.UTF8String);
|
||||||
@@ -62,6 +41,23 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if ([type isEqualToString:@"c"]) {
|
||||||
|
NSData *m_head = [@"<meta itemprop=\"channelId\" content=\"" dataUsingEncoding:NSUTF8StringEncoding];
|
||||||
|
NSRange tmp = [html rangeOfData:m_head options:0 range:NSMakeRange(0, html.length)];
|
||||||
|
if (tmp.location == NSNotFound) {
|
||||||
|
NSData *m_json = [@"\"channelId\":\"" dataUsingEncoding:NSUTF8StringEncoding];
|
||||||
|
tmp = [html rangeOfData:m_json options:0 range:NSMakeRange(0, html.length)];
|
||||||
|
}
|
||||||
|
NSUInteger start = tmp.location + tmp.length;
|
||||||
|
NSUInteger end = html.length - start;
|
||||||
|
if (end > 50) end = 50; // no need to search till the end
|
||||||
|
NSString *substr = [[NSString alloc] initWithData:[html subdataWithRange:NSMakeRange(start, end)] encoding:NSUTF8StringEncoding];
|
||||||
|
if (substr) {
|
||||||
|
NSUInteger to = [substr rangeOfString:@"\""].location;
|
||||||
|
if (to != NSNotFound) {
|
||||||
|
found = [ytBase stringByAppendingFormat:@"?channel_id=%@", [substr substringToIndex:to]];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if DEBUG && ENV_LOG_YOUTUBE
|
#if DEBUG && ENV_LOG_YOUTUBE
|
||||||
|
|||||||
@@ -1,29 +1,9 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
@class Feed, RSHTMLMetadata, FeedDownload;
|
@class Feed, RSHTMLMetadata, FeedDownload;
|
||||||
@protocol FaviconDownloadDelegate;
|
@protocol FaviconDownloadDelegate;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface FaviconDownload : NSObject
|
@interface FaviconDownload : NSObject
|
||||||
/// @c img and @c path are @c nil if image is not valid or couldn't be downloaded.
|
/// @c img and @c path are @c nil if image is not valid or couldn't be downloaded.
|
||||||
typedef void(^FaviconDownloadBlock)(NSImage * _Nullable img, NSURL * _Nullable path);
|
typedef void(^FaviconDownloadBlock)(NSImage * _Nullable img, NSURL * _Nullable path);
|
||||||
@@ -36,7 +16,7 @@ typedef void(^FaviconDownloadBlock)(NSImage * _Nullable img, NSURL * _Nullable p
|
|||||||
- (instancetype)startWithBlock:(nonnull FaviconDownloadBlock)block;
|
- (instancetype)startWithBlock:(nonnull FaviconDownloadBlock)block;
|
||||||
- (void)cancel;
|
- (void)cancel;
|
||||||
// Extract from HTML metadata
|
// Extract from HTML metadata
|
||||||
+ (nullable NSString*)urlForMetadata:(RSHTMLMetadata*)meta;
|
+ (nullable NSString*)urlForMetadata:(nullable RSHTMLMetadata*)meta;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
@@ -45,3 +25,5 @@ typedef void(^FaviconDownloadBlock)(NSImage * _Nullable img, NSURL * _Nullable p
|
|||||||
/// Called after image download. Called on error, but not if download is cancled.
|
/// Called after image download. Called on error, but not if download is cancled.
|
||||||
- (void)faviconDownload:(FaviconDownload*)sender didFinish:(nullable NSURL*)path;
|
- (void)faviconDownload:(FaviconDownload*)sender didFinish:(nullable NSURL*)path;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import RSXML2;
|
@import RSXML2;
|
||||||
#import "FaviconDownload.h"
|
#import "FaviconDownload.h"
|
||||||
#import "Feed+Ext.h"
|
#import "Feed+Ext.h"
|
||||||
@@ -147,7 +125,13 @@
|
|||||||
return;
|
return;
|
||||||
self.currentDownload = [[NSURLRequest requestWithURL:self.remoteURL] downloadTask:^(NSURL * _Nullable path, NSError * _Nullable error) {
|
self.currentDownload = [[NSURLRequest requestWithURL:self.remoteURL] downloadTask:^(NSURL * _Nullable path, NSError * _Nullable error) {
|
||||||
if (error) path = nil; // will also nullify img
|
if (error) path = nil; // will also nullify img
|
||||||
NSImage *img = path ? [[NSImage alloc] initByReferencingURL:path] : nil;
|
NSImage *img;
|
||||||
|
if (path) {
|
||||||
|
NSData* data = [[NSData alloc] initWithContentsOfURL:path];
|
||||||
|
img = [[NSImage alloc] initWithData:data];
|
||||||
|
} else {
|
||||||
|
img = nil;
|
||||||
|
}
|
||||||
if (img.valid) {
|
if (img.valid) {
|
||||||
// move image to temporary destination, otherwise dataTask: will delete it.
|
// move image to temporary destination, otherwise dataTask: will delete it.
|
||||||
NSString *tmpFile = NSProcessInfo.processInfo.globallyUniqueString;
|
NSString *tmpFile = NSProcessInfo.processInfo.globallyUniqueString;
|
||||||
@@ -166,7 +150,8 @@
|
|||||||
if (self.canceled)
|
if (self.canceled)
|
||||||
return;
|
return;
|
||||||
NSURL *path = self.fileURL;
|
NSURL *path = self.fileURL;
|
||||||
NSImage *img = [[NSImage alloc] initByReferencingURL:path];
|
NSData* data = [[NSData alloc] initWithContentsOfURL:path];
|
||||||
|
NSImage* img = [[NSImage alloc] initWithData:data];
|
||||||
if (!img.valid) { path = nil; img = nil; }
|
if (!img.valid) { path = nil; img = nil; }
|
||||||
#if DEBUG && ENV_LOG_DOWNLOAD
|
#if DEBUG && ENV_LOG_DOWNLOAD
|
||||||
printf("ICON %1.0fx%1.0f %s\n", img.size.width, img.size.height, self.remoteURL.absoluteString.UTF8String);
|
printf("ICON %1.0fx%1.0f %s\n", img.size.width, img.size.height, self.remoteURL.absoluteString.UTF8String);
|
||||||
@@ -183,7 +168,7 @@
|
|||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
|
|
||||||
/// Extract favicon URL from parsed HTML metadata.
|
/// Extract favicon URL from parsed HTML metadata.
|
||||||
+ (nullable NSString*)urlForMetadata:(RSHTMLMetadata*)meta {
|
+ (nullable NSString*)urlForMetadata:(nullable RSHTMLMetadata*)meta {
|
||||||
if (!meta) return nil;
|
if (!meta) return nil;
|
||||||
|
|
||||||
double bestScore = DBL_MAX;
|
double bestScore = DBL_MAX;
|
||||||
|
|||||||
@@ -1,29 +1,9 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
@class RSParsedFeed, RSHTMLMetadataFeedLink, Feed, FaviconDownload;
|
@class RSParsedFeed, RSHTMLMetadataFeedLink, Feed, FaviconDownload;
|
||||||
@protocol FeedDownloadDelegate;
|
@protocol FeedDownloadDelegate;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/**
|
||||||
All properties will be parsed and stored in local variables.
|
All properties will be parsed and stored in local variables.
|
||||||
This will avoid unnecessary core data operations if user decides to cancel the edit.
|
This will avoid unnecessary core data operations if user decides to cancel the edit.
|
||||||
@@ -55,9 +35,11 @@ typedef void (^FeedDownloadBlock)(FeedDownload *sender);
|
|||||||
@protocol FeedDownloadDelegate <NSObject>
|
@protocol FeedDownloadDelegate <NSObject>
|
||||||
@optional
|
@optional
|
||||||
/// Delegate must return chosen URL. If not implemented, the first URL will be used.
|
/// Delegate must return chosen URL. If not implemented, the first URL will be used.
|
||||||
- (NSString*)feedDownload:(FeedDownload*)sender selectFeedFromList:(NSArray<RSHTMLMetadataFeedLink*>*)list;
|
- (nullable NSString*)feedDownload:(FeedDownload*)sender selectFeedFromList:(NSArray<RSHTMLMetadataFeedLink*>*)list;
|
||||||
/// Only called if an URL redirect occured.
|
/// Only called if an URL redirect occured.
|
||||||
- (void)feedDownload:(FeedDownload*)sender urlRedirected:(NSString*)newURL;
|
- (void)feedDownload:(FeedDownload*)sender urlRedirected:(NSString*)newURL;
|
||||||
/// Called after xml data is loaded and parsed. Called on error, but not if download is cancled.
|
/// Called after xml data is loaded and parsed. Called on error, but not if download is cancled.
|
||||||
- (void)feedDownloadDidFinish:(FeedDownload*)sender;
|
- (void)feedDownloadDidFinish:(FeedDownload*)sender;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import RSXML2;
|
@import RSXML2;
|
||||||
#import "FeedDownload.h"
|
#import "FeedDownload.h"
|
||||||
#import "FaviconDownload.h"
|
#import "FaviconDownload.h"
|
||||||
@@ -178,7 +156,7 @@
|
|||||||
}
|
}
|
||||||
else if (!meta || meta.feedLinks.count == 0) {
|
else if (!meta || meta.feedLinks.count == 0) {
|
||||||
if ([xml.url.host hasSuffix:@"youtube.com"])
|
if ([xml.url.host hasSuffix:@"youtube.com"])
|
||||||
feedURL = [YouTubePlugin feedURL:xml.url];
|
feedURL = [YouTubePlugin feedURL:xml.url data:xml.data];
|
||||||
if (feedURL.length == 0)
|
if (feedURL.length == 0)
|
||||||
self.error = [NSError feedURLNotFound:xml.url];
|
self.error = [NSError feedURLNotFound:xml.url];
|
||||||
}
|
}
|
||||||
@@ -190,7 +168,7 @@
|
|||||||
self.error = [NSError canceledByUser];
|
self.error = [NSError canceledByUser];
|
||||||
}
|
}
|
||||||
// finalize HTML parsing
|
// finalize HTML parsing
|
||||||
if (self.error) {
|
if (self.error || !feedURL) {
|
||||||
[self finishAndNotify];
|
[self finishAndNotify];
|
||||||
} else {
|
} else {
|
||||||
self.assertIsFeedURL = YES;
|
self.assertIsFeedURL = YES;
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
@class FeedGroup;
|
@class FeedGroup;
|
||||||
|
|
||||||
@@ -28,6 +6,8 @@ typedef NS_OPTIONS(NSUInteger, OpmlFileExportOptions) {
|
|||||||
OpmlFileExportOptionFullBackup = 1 << 2,
|
OpmlFileExportOptionFullBackup = 1 << 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
#pragma mark - Protocols
|
#pragma mark - Protocols
|
||||||
|
|
||||||
@protocol OpmlFileImportDelegate <NSObject>
|
@protocol OpmlFileImportDelegate <NSObject>
|
||||||
@@ -61,3 +41,5 @@ typedef NS_OPTIONS(NSUInteger, OpmlFileExportOptions) {
|
|||||||
- (void)showExportDialog:(NSWindow*)window;
|
- (void)showExportDialog:(NSWindow*)window;
|
||||||
- (nullable NSError*)writeOPMLFile:(NSURL*)url withOptions:(OpmlFileExportOptions)opt;
|
- (nullable NSError*)writeOPMLFile:(NSURL*)url withOptions:(OpmlFileExportOptions)opt;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import RSXML2;
|
@import RSXML2;
|
||||||
#import "OpmlFile.h"
|
#import "OpmlFile.h"
|
||||||
#import "FeedMeta+Ext.h"
|
#import "FeedMeta+Ext.h"
|
||||||
|
|||||||
@@ -1,29 +1,9 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
@class Feed;
|
@class Feed;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface UpdateScheduler : NSObject
|
@interface UpdateScheduler : NSObject
|
||||||
@property (class, readonly) NSUInteger feedsInQueue;
|
@property (class, readonly) NSUInteger feedsInQueue;
|
||||||
@property (class, readonly) NSDate *dateScheduled;
|
@property (class, readonly) NSDate *dateScheduled;
|
||||||
@@ -46,3 +26,5 @@
|
|||||||
+ (void)registerNetworkChangeNotification;
|
+ (void)registerNetworkChangeNotification;
|
||||||
+ (void)unregisterNetworkChangeNotification;
|
+ (void)unregisterNetworkChangeNotification;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import SystemConfiguration;
|
@import SystemConfiguration;
|
||||||
#import "UpdateScheduler.h"
|
#import "UpdateScheduler.h"
|
||||||
#import "Constants.h"
|
#import "Constants.h"
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
/// Draw separator line in @c NSOutlineView
|
/// Draw separator line in @c NSOutlineView
|
||||||
|
|||||||
@@ -1,28 +1,6 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "DrawImage.h"
|
#import "DrawImage.h"
|
||||||
#import "Constants.h"
|
#import "Constants.h"
|
||||||
#import "UserPrefs.h"
|
#import "NSColor+Ext.h"
|
||||||
|
|
||||||
|
|
||||||
@implementation DrawSeparator
|
@implementation DrawSeparator
|
||||||
@@ -312,15 +290,11 @@ static void Register(CGFloat size, NSImageName name, NSString *description, BOOL
|
|||||||
|
|
||||||
/// Register all icons that require custom drawing in @c ImageNamed cache
|
/// Register all icons that require custom drawing in @c ImageNamed cache
|
||||||
void RegisterImageViewNames(void) {
|
void RegisterImageViewNames(void) {
|
||||||
NSColor *orange = [NSColor colorWithCalibratedRed:251/255.f green:163/255.f blue:58/255.f alpha:1.f]; // #FBA33A
|
Register(16, RSSImageDefaultRSSIcon, NSLocalizedString(@"RSS icon", nil), ^(NSRect r) { DrawRSSGradientIcon(r, [NSColor rssOrange]); return YES; });
|
||||||
NSColor *c1 = UserPrefsColor(Pref_colorStatusIconTint, orange);
|
|
||||||
NSColor *c2 = UserPrefsColor(Pref_colorUnreadIndicator, [NSColor systemBlueColor]);
|
|
||||||
|
|
||||||
Register(16, RSSImageDefaultRSSIcon, NSLocalizedString(@"RSS icon", nil), ^(NSRect r) { DrawRSSGradientIcon(r, orange); return YES; });
|
|
||||||
Register(16, RSSImageSettingsGlobal, NSLocalizedString(@"Global settings", nil), ^(NSRect r) { DrawGlobalIcon(r, [NSColor controlTextColor].CGColor, NO); return YES; });
|
Register(16, RSSImageSettingsGlobal, NSLocalizedString(@"Global settings", nil), ^(NSRect r) { DrawGlobalIcon(r, [NSColor controlTextColor].CGColor, NO); return YES; });
|
||||||
Register(16, RSSImageSettingsGroup, NSLocalizedString(@"Group settings", nil), ^(NSRect r) { DrawGroupIcon(r, [NSColor controlTextColor].CGColor, NO); return YES; });
|
Register(16, RSSImageSettingsGroup, NSLocalizedString(@"Group settings", nil), ^(NSRect r) { DrawGroupIcon(r, [NSColor controlTextColor].CGColor, NO); return YES; });
|
||||||
Register(16, RSSImageSettingsFeed, NSLocalizedString(@"Feed settings", nil), ^(NSRect r) { DrawRSSIcon(r, [NSColor controlTextColor].CGColor, NO, YES); return YES; });
|
Register(16, RSSImageSettingsFeed, NSLocalizedString(@"Feed settings", nil), ^(NSRect r) { DrawRSSIcon(r, [NSColor controlTextColor].CGColor, NO, YES); return YES; });
|
||||||
Register(16, RSSImageMenuBarIconActive, NSLocalizedString(@"RSS menu bar icon", nil), ^(NSRect r) { DrawRSSIcon(r, c1.CGColor, YES, YES); return YES; });
|
Register(16, RSSImageMenuBarIconActive, NSLocalizedString(@"RSS menu bar icon", nil), ^(NSRect r) { DrawRSSIcon(r, [NSColor menuBarIconColor].CGColor, YES, YES); return YES; });
|
||||||
Register(16, RSSImageMenuBarIconPaused, NSLocalizedString(@"RSS menu bar icon, paused", nil), ^(NSRect r) { DrawRSSIcon(r, c1.CGColor, YES, NO); return YES; });
|
Register(16, RSSImageMenuBarIconPaused, NSLocalizedString(@"RSS menu bar icon, paused", nil), ^(NSRect r) { DrawRSSIcon(r, [NSColor menuBarIconColor].CGColor, YES, NO); return YES; });
|
||||||
Register(14, RSSImageMenuItemUnread, NSLocalizedString(@"Unread icon", nil), ^(NSRect r) { DrawUnreadIcon(r, c2); return YES; });
|
Register(14, RSSImageMenuItemUnread, NSLocalizedString(@"Unread icon", nil), ^(NSRect r) { DrawUnreadIcon(r, [NSColor unreadIndicatorColor]); return YES; });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
@interface URLScheme : NSObject
|
@interface URLScheme : NSObject
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "URLScheme.h"
|
#import "URLScheme.h"
|
||||||
#import "AppHook.h" // barss:open/preferences
|
#import "AppHook.h" // barss:open/preferences
|
||||||
#import "Preferences.h" // barss:open/preferences
|
#import "Preferences.h" // barss:open/preferences
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#ifndef UserPrefs_h
|
#ifndef UserPrefs_h
|
||||||
#define UserPrefs_h
|
#define UserPrefs_h
|
||||||
|
|
||||||
@@ -41,15 +19,18 @@
|
|||||||
/** default: @c YES */ static NSString* const Pref_globalOpenUnread = @"globalOpenUnread";
|
/** default: @c YES */ static NSString* const Pref_globalOpenUnread = @"globalOpenUnread";
|
||||||
/** default: @c YES */ static NSString* const Pref_globalMarkRead = @"globalMarkRead";
|
/** default: @c YES */ static NSString* const Pref_globalMarkRead = @"globalMarkRead";
|
||||||
/** default: @c YES */ static NSString* const Pref_globalMarkUnread = @"globalMarkUnread";
|
/** default: @c YES */ static NSString* const Pref_globalMarkUnread = @"globalMarkUnread";
|
||||||
|
/** default: @c NO */ static NSString* const Pref_globalUnreadOnly = @"globalUnreadOnly";
|
||||||
/** default: @c YES */ static NSString* const Pref_globalUnreadCount = @"globalUnreadCount";
|
/** default: @c YES */ static NSString* const Pref_globalUnreadCount = @"globalUnreadCount";
|
||||||
/** default: @c YES */ static NSString* const Pref_groupOpenUnread = @"groupOpenUnread";
|
/** default: @c YES */ static NSString* const Pref_groupOpenUnread = @"groupOpenUnread";
|
||||||
/** default: @c YES */ static NSString* const Pref_groupMarkRead = @"groupMarkRead";
|
/** default: @c YES */ static NSString* const Pref_groupMarkRead = @"groupMarkRead";
|
||||||
/** default: @c YES */ static NSString* const Pref_groupMarkUnread = @"groupMarkUnread";
|
/** default: @c YES */ static NSString* const Pref_groupMarkUnread = @"groupMarkUnread";
|
||||||
|
/** default: @c NO */ static NSString* const Pref_groupUnreadOnly = @"groupUnreadOnly";
|
||||||
/** default: @c YES */ static NSString* const Pref_groupUnreadCount = @"groupUnreadCount";
|
/** default: @c YES */ static NSString* const Pref_groupUnreadCount = @"groupUnreadCount";
|
||||||
/** default: @c NO */ static NSString* const Pref_groupUnreadIndicator = @"groupUnreadIndicator";
|
/** default: @c NO */ static NSString* const Pref_groupUnreadIndicator = @"groupUnreadIndicator";
|
||||||
/** default: @c YES */ static NSString* const Pref_feedOpenUnread = @"feedOpenUnread";
|
/** default: @c YES */ static NSString* const Pref_feedOpenUnread = @"feedOpenUnread";
|
||||||
/** default: @c YES */ static NSString* const Pref_feedMarkRead = @"feedMarkRead";
|
/** default: @c YES */ static NSString* const Pref_feedMarkRead = @"feedMarkRead";
|
||||||
/** default: @c YES */ static NSString* const Pref_feedMarkUnread = @"feedMarkUnread";
|
/** default: @c YES */ static NSString* const Pref_feedMarkUnread = @"feedMarkUnread";
|
||||||
|
/** default: @c NO */ static NSString* const Pref_feedUnreadOnly = @"feedUnreadOnly";
|
||||||
/** default: @c YES */ static NSString* const Pref_feedUnreadCount = @"feedUnreadCount";
|
/** default: @c YES */ static NSString* const Pref_feedUnreadCount = @"feedUnreadCount";
|
||||||
/** default: @c YES */ static NSString* const Pref_feedUnreadIndicator = @"feedUnreadIndicator";
|
/** default: @c YES */ static NSString* const Pref_feedUnreadIndicator = @"feedUnreadIndicator";
|
||||||
/** default: @c NO */ static NSString* const Pref_feedTruncateTitle = @"feedTruncateTitle";
|
/** default: @c NO */ static NSString* const Pref_feedTruncateTitle = @"feedTruncateTitle";
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "UserPrefs.h"
|
#import "UserPrefs.h"
|
||||||
#import "NSString+Ext.h" // hexColor
|
#import "NSString+Ext.h" // hexColor
|
||||||
|
|
||||||
@@ -32,16 +10,21 @@ static inline void defaultsAppend(NSMutableDictionary *defs, id value, NSArray<N
|
|||||||
/// Helper method calls @c (standardUserDefaults)registerDefaults:
|
/// Helper method calls @c (standardUserDefaults)registerDefaults:
|
||||||
void UserPrefsInit(void) {
|
void UserPrefsInit(void) {
|
||||||
NSMutableDictionary *defs = [NSMutableDictionary dictionary];
|
NSMutableDictionary *defs = [NSMutableDictionary dictionary];
|
||||||
defaultsAppend(defs, @YES, @[Pref_globalTintMenuIcon,
|
defaultsAppend(defs, @YES, @[
|
||||||
|
Pref_globalTintMenuIcon,
|
||||||
Pref_globalUpdateAll,
|
Pref_globalUpdateAll,
|
||||||
Pref_globalOpenUnread, Pref_groupOpenUnread, Pref_feedOpenUnread,
|
Pref_globalOpenUnread, Pref_groupOpenUnread, Pref_feedOpenUnread,
|
||||||
Pref_globalMarkRead, Pref_groupMarkRead, Pref_feedMarkRead,
|
Pref_globalMarkRead, Pref_groupMarkRead, Pref_feedMarkRead,
|
||||||
Pref_globalMarkUnread, Pref_groupMarkUnread, Pref_feedMarkUnread,
|
Pref_globalMarkUnread, Pref_groupMarkUnread, Pref_feedMarkUnread,
|
||||||
Pref_globalUnreadCount, Pref_groupUnreadCount, Pref_feedUnreadCount,
|
Pref_globalUnreadCount, Pref_groupUnreadCount, Pref_feedUnreadCount,
|
||||||
Pref_feedUnreadIndicator]);
|
Pref_feedUnreadIndicator
|
||||||
defaultsAppend(defs, @NO, @[Pref_groupUnreadIndicator,
|
]);
|
||||||
|
defaultsAppend(defs, @NO, @[
|
||||||
|
Pref_globalUnreadOnly, Pref_groupUnreadOnly, Pref_feedUnreadOnly,
|
||||||
|
Pref_groupUnreadIndicator,
|
||||||
Pref_feedTruncateTitle,
|
Pref_feedTruncateTitle,
|
||||||
Pref_feedLimitArticles]);
|
Pref_feedLimitArticles
|
||||||
|
]);
|
||||||
// Display limits & truncation ( defaults write de.relikd.baRSS {KEY} -int 10 )
|
// Display limits & truncation ( defaults write de.relikd.baRSS {KEY} -int 10 )
|
||||||
[defs setObject:[NSNumber numberWithUnsignedInteger:10] forKey:Pref_openFewLinksLimit];
|
[defs setObject:[NSNumber numberWithUnsignedInteger:10] forKey:Pref_openFewLinksLimit];
|
||||||
[defs setObject:[NSNumber numberWithUnsignedInteger:60] forKey:Pref_shortArticleNamesLimit];
|
[defs setObject:[NSNumber numberWithUnsignedInteger:60] forKey:Pref_shortArticleNamesLimit];
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.0.2</string>
|
<string>1.2.2</string>
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>14471</string>
|
<string>14866</string>
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
<string>public.app-category.news</string>
|
<string>public.app-category.news</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>Copyright © 2019 relikd. Public Domain.</string>
|
<string>Copyright © 2020 relikd.</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string>AppHook</string>
|
<string>AppHook</string>
|
||||||
<key>UTImportedTypeDeclarations</key>
|
<key>UTImportedTypeDeclarations</key>
|
||||||
|
|||||||
14
baRSS/NSCategories/NSColor+Ext.h
Normal file
14
baRSS/NSCategories/NSColor+Ext.h
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@import Cocoa;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface NSColor (Ext)
|
||||||
|
/** @return @c RGB(251,163,58) @c (#FBA33A) */
|
||||||
|
+ (instancetype)rssOrange;
|
||||||
|
/** @return User preferred color; default: @c rssOrange */
|
||||||
|
+ (instancetype)menuBarIconColor;
|
||||||
|
/** @return User preferred color; default: @c systemBlueColor */
|
||||||
|
+ (instancetype)unreadIndicatorColor;
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
41
baRSS/NSCategories/NSColor+Ext.m
Normal file
41
baRSS/NSCategories/NSColor+Ext.m
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
#import "NSColor+Ext.h"
|
||||||
|
#import "UserPrefs.h"
|
||||||
|
|
||||||
|
@implementation NSColor (Ext)
|
||||||
|
|
||||||
|
+ (instancetype)rssOrange {
|
||||||
|
static NSColor *color;
|
||||||
|
static dispatch_once_t onceToken;
|
||||||
|
dispatch_once(&onceToken, ^{
|
||||||
|
color = [NSColor colorWithCalibratedRed:251/255.f green:163/255.f blue:58/255.f alpha:1.f]; // #FBA33A
|
||||||
|
});
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (instancetype)menuBarIconColor {
|
||||||
|
static NSColor *color;
|
||||||
|
static dispatch_once_t onceToken;
|
||||||
|
dispatch_once(&onceToken, ^{
|
||||||
|
if (@available(macOS 10.14, *)) {
|
||||||
|
color = UserPrefsColor(Pref_colorStatusIconTint, [NSColor controlAccentColor]);
|
||||||
|
} else {
|
||||||
|
color = UserPrefsColor(Pref_colorStatusIconTint, [self rssOrange]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (instancetype)unreadIndicatorColor {
|
||||||
|
static NSColor *color;
|
||||||
|
static dispatch_once_t onceToken;
|
||||||
|
dispatch_once(&onceToken, ^{
|
||||||
|
if (@available(macOS 10.14, *)) {
|
||||||
|
color = UserPrefsColor(Pref_colorUnreadIndicator, [NSColor controlAccentColor]);
|
||||||
|
} else {
|
||||||
|
color = UserPrefsColor(Pref_colorUnreadIndicator, [NSColor systemBlueColor]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
typedef int32_t Interval;
|
typedef int32_t Interval;
|
||||||
@@ -32,6 +10,8 @@ typedef NS_ENUM(int32_t, TimeUnitType) {
|
|||||||
TimeUnitYears = 365 * 24 * 60 * 60
|
TimeUnitYears = 365 * 24 * 60 * 60
|
||||||
};
|
};
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface NSDate (Ext)
|
@interface NSDate (Ext)
|
||||||
+ (NSString*)timeStringISO8601;
|
+ (NSString*)timeStringISO8601;
|
||||||
+ (NSString*)dayStringISO8601;
|
+ (NSString*)dayStringISO8601;
|
||||||
@@ -55,5 +35,7 @@ typedef NS_ENUM(int32_t, TimeUnitType) {
|
|||||||
|
|
||||||
|
|
||||||
@interface NSDate (Statistics)
|
@interface NSDate (Statistics)
|
||||||
+ (NSDictionary*)refreshIntervalStatistics:(NSArray<NSDate*> *)list;
|
+ (nullable NSDictionary*)refreshIntervalStatistics:(NSArray<NSDate*> *)list;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import QuartzCore;
|
@import QuartzCore;
|
||||||
#import "NSDate+Ext.h"
|
#import "NSDate+Ext.h"
|
||||||
|
|
||||||
@@ -162,7 +140,7 @@ static TimeUnitType const _values[] = {
|
|||||||
/**
|
/**
|
||||||
@return @c nil if list contains less than 2 entries. Otherwise: @{min, max, avg, median, earliest, latest}
|
@return @c nil if list contains less than 2 entries. Otherwise: @{min, max, avg, median, earliest, latest}
|
||||||
*/
|
*/
|
||||||
+ (NSDictionary*)refreshIntervalStatistics:(NSArray<NSDate*> *)list {
|
+ (nullable NSDictionary*)refreshIntervalStatistics:(NSArray<NSDate*> *)list {
|
||||||
if (!list || list.count == 0)
|
if (!list || list.count == 0)
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
|
|||||||
@@ -1,30 +1,10 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
/// Log error message and prepend calling class and calling method.
|
/// Log error message and prepend calling class and calling method.
|
||||||
#define NSLogCaller(desc) { NSLog(@"%@:%@ %@", [self class], NSStringFromSelector(_cmd), desc); }
|
#define NSLogCaller(desc) { NSLog(@"%@:%@ %@", [self class], NSStringFromSelector(_cmd), desc); }
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface NSError (Ext)
|
@interface NSError (Ext)
|
||||||
// Generators
|
// Generators
|
||||||
+ (instancetype)statusCode:(NSInteger)code reason:(nullable NSString*)reason;
|
+ (instancetype)statusCode:(NSInteger)code reason:(nullable NSString*)reason;
|
||||||
@@ -35,3 +15,5 @@
|
|||||||
- (BOOL)inCaseLog:(nullable const char*)title;
|
- (BOOL)inCaseLog:(nullable const char*)title;
|
||||||
- (BOOL)inCasePresent:(NSApplication*)app;
|
- (BOOL)inCasePresent:(NSApplication*)app;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import RSXML2.RSXMLError;
|
@import RSXML2.RSXMLError;
|
||||||
#import "NSError+Ext.h"
|
#import "NSError+Ext.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,7 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface NSString (PlainHTML)
|
@interface NSString (PlainHTML)
|
||||||
+ (NSString*)plainTextFromHTMLData:(NSData*)data;
|
+ (NSString*)plainTextFromHTMLData:(NSData*)data;
|
||||||
- (nonnull NSString*)htmlToPlainText;
|
- (nonnull NSString*)htmlToPlainText;
|
||||||
@@ -30,3 +10,5 @@
|
|||||||
@interface NSString (HexColor)
|
@interface NSString (HexColor)
|
||||||
- (nullable NSColor*)hexColor;
|
- (nullable NSColor*)hexColor;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "NSString+Ext.h"
|
#import "NSString+Ext.h"
|
||||||
|
|
||||||
@implementation NSString (PlainHTML)
|
@implementation NSString (PlainHTML)
|
||||||
|
|||||||
@@ -1,29 +1,9 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
#define ENV_LOG_FILES 0
|
#define ENV_LOG_FILES 0
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface NSURL (Ext)
|
@interface NSURL (Ext)
|
||||||
// Generators
|
// Generators
|
||||||
+ (NSURL*)applicationSupportURL;
|
+ (NSURL*)applicationSupportURL;
|
||||||
@@ -38,3 +18,5 @@
|
|||||||
- (void)remove;
|
- (void)remove;
|
||||||
- (void)moveTo:(NSURL*)destination;
|
- (void)moveTo:(NSURL*)destination;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "NSURL+Ext.h"
|
#import "NSURL+Ext.h"
|
||||||
#import "NSError+Ext.h"
|
#import "NSError+Ext.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,31 +1,13 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
#define ENV_LOG_DOWNLOAD 1
|
#define ENV_LOG_DOWNLOAD 1
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface NSURLRequest (Ext)
|
@interface NSURLRequest (Ext)
|
||||||
+ (instancetype)withURL:(NSString*)urlStr;
|
+ (instancetype)withURL:(NSString*)urlStr;
|
||||||
- (NSURLSessionDataTask*)dataTask:(nonnull void(^)(NSData * _Nullable data, NSError * _Nullable error, NSHTTPURLResponse *response))block;
|
- (NSURLSessionDataTask*)dataTask:(nonnull void(^)(NSData * _Nullable data, NSError * _Nullable error, NSHTTPURLResponse *response))block;
|
||||||
- (NSURLSessionDownloadTask*)downloadTask:(void(^)(NSURL * _Nullable path, NSError * _Nullable error))block;
|
- (NSURLSessionDownloadTask*)downloadTask:(void(^)(NSURL * _Nullable path, NSError * _Nullable error))block;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "NSURLRequest+Ext.h"
|
#import "NSURLRequest+Ext.h"
|
||||||
#import "NSString+Ext.h"
|
#import "NSString+Ext.h"
|
||||||
#import "NSError+Ext.h"
|
#import "NSError+Ext.h"
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
/***/ static CGFloat const PAD_WIN = 20; // window padding
|
/***/ static CGFloat const PAD_WIN = 20; // window padding
|
||||||
@@ -40,6 +18,8 @@
|
|||||||
/// Static variable to calculate origin center coordinate in its @c superview. The value of this var isn't used.
|
/// Static variable to calculate origin center coordinate in its @c superview. The value of this var isn't used.
|
||||||
static CGFloat const CENTER = -0.015625;
|
static CGFloat const CENTER = -0.015625;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/// Calculate @c origin.y going down from the top border of its @c superview
|
/// Calculate @c origin.y going down from the top border of its @c superview
|
||||||
static inline CGFloat YFromTop(NSView *view) { return NSHeight(view.superview.frame) - NSMinY(view.frame) - view.alignmentRectInsets.bottom; }
|
static inline CGFloat YFromTop(NSView *view) { return NSHeight(view.superview.frame) - NSMinY(view.frame) - view.alignmentRectInsets.bottom; }
|
||||||
/// @c MAX()
|
/// @c MAX()
|
||||||
@@ -65,11 +45,11 @@ static inline CGFloat NSMaxWidth(NSView *a, NSView *b) { return Max(NSWidth(a.fr
|
|||||||
+ (NSButton*)inlineButton:(NSString*)text;
|
+ (NSButton*)inlineButton:(NSString*)text;
|
||||||
+ (NSPopUpButton*)popupButton:(CGFloat)w;
|
+ (NSPopUpButton*)popupButton:(CGFloat)w;
|
||||||
// UI: Others
|
// UI: Others
|
||||||
+ (NSImageView*)imageView:(NSImageName)name size:(CGFloat)size;
|
+ (NSImageView*)imageView:(nullable NSImageName)name size:(CGFloat)size;
|
||||||
+ (NSButton*)checkbox:(BOOL)flag;
|
+ (NSButton*)checkbox:(BOOL)flag;
|
||||||
+ (NSProgressIndicator*)activitySpinner;
|
+ (NSProgressIndicator*)activitySpinner;
|
||||||
+ (NSView*)radioGroup:(NSArray<NSString*>*)entries target:(id)target action:(nonnull SEL)action;
|
+ (nullable NSView*)radioGroup:(NSArray<NSString*>*)entries target:(id)target action:(nonnull SEL)action;
|
||||||
+ (NSView*)radioGroup:(NSArray<NSString*>*)entries;
|
+ (nullable NSView*)radioGroup:(NSArray<NSString*>*)entries;
|
||||||
// UI: Enclosing Container
|
// UI: Enclosing Container
|
||||||
+ (NSPopover*)popover:(NSSize)size;
|
+ (NSPopover*)popover:(NSSize)size;
|
||||||
- (NSScrollView*)wrapContent:(NSView*)content inScrollView:(NSRect)rect;
|
- (NSScrollView*)wrapContent:(NSView*)content inScrollView:(NSRect)rect;
|
||||||
@@ -91,7 +71,7 @@ static inline CGFloat NSMaxWidth(NSView *a, NSView *b) { return Max(NSWidth(a.fr
|
|||||||
|
|
||||||
|
|
||||||
@interface NSControl (Ext)
|
@interface NSControl (Ext)
|
||||||
- (instancetype)action:(SEL)selector target:(id)target;
|
- (instancetype)action:(SEL)selector target:(nullable id)target;
|
||||||
- (instancetype)large;
|
- (instancetype)large;
|
||||||
- (instancetype)small;
|
- (instancetype)small;
|
||||||
- (instancetype)tiny;
|
- (instancetype)tiny;
|
||||||
@@ -106,3 +86,5 @@ static inline CGFloat NSMaxWidth(NSView *a, NSView *b) { return Max(NSWidth(a.fr
|
|||||||
- (instancetype)selectable;
|
- (instancetype)selectable;
|
||||||
- (instancetype)multiline:(NSSize)size;
|
- (instancetype)multiline:(NSSize)size;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "NSView+Ext.h"
|
#import "NSView+Ext.h"
|
||||||
|
|
||||||
@implementation NSView (Ext)
|
@implementation NSView (Ext)
|
||||||
@@ -122,7 +100,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/// Create @c ImageView with square @c size
|
/// Create @c ImageView with square @c size
|
||||||
+ (NSImageView*)imageView:(NSImageName)name size:(CGFloat)size {
|
+ (NSImageView*)imageView:(nullable NSImageName)name size:(CGFloat)size {
|
||||||
NSImageView *imgView = [[NSImageView alloc] initWithFrame: NSMakeRect(0, 0, size, size)];
|
NSImageView *imgView = [[NSImageView alloc] initWithFrame: NSMakeRect(0, 0, size, size)];
|
||||||
if (name) imgView.image = [NSImage imageNamed:name];
|
if (name) imgView.image = [NSImage imageNamed:name];
|
||||||
return imgView;
|
return imgView;
|
||||||
@@ -148,7 +126,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Create grouping view with vertically, left-aligned radio buttons. Action is identical for all buttons (grouping).
|
/// Create grouping view with vertically, left-aligned radio buttons. Action is identical for all buttons (grouping).
|
||||||
+ (NSView*)radioGroup:(NSArray<NSString*>*)entries target:(id)target action:(nonnull SEL)action {
|
+ (nullable NSView*)radioGroup:(NSArray<NSString*>*)entries target:(id)target action:(nonnull SEL)action {
|
||||||
if (entries.count == 0)
|
if (entries.count == 0)
|
||||||
return nil;
|
return nil;
|
||||||
CGFloat w = 0, h = 0;
|
CGFloat w = 0, h = 0;
|
||||||
@@ -167,7 +145,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Same as @c radioGroup:target:action: but using dummy action to ignore radio button click events.
|
/// Same as @c radioGroup:target:action: but using dummy action to ignore radio button click events.
|
||||||
+ (NSView*)radioGroup:(NSArray<NSString*>*)entries {
|
+ (nullable NSView*)radioGroup:(NSArray<NSString*>*)entries {
|
||||||
return [self radioGroup:entries target:self action:@selector(donothing)];
|
return [self radioGroup:entries target:self action:@selector(donothing)];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -328,7 +306,7 @@ static inline void SetFrameWidth(NSView *view, CGFloat w) {
|
|||||||
@implementation NSControl (Ext)
|
@implementation NSControl (Ext)
|
||||||
|
|
||||||
/// Set @c target and @c action simultaneously
|
/// Set @c target and @c action simultaneously
|
||||||
- (instancetype)action:(SEL)selector target:(id)target {
|
- (instancetype)action:(SEL)selector target:(nullable id)target {
|
||||||
self.action = selector;
|
self.action = selector;
|
||||||
self.target = target;
|
self.target = target;
|
||||||
return self;
|
return self;
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
@interface SettingsAbout : NSViewController
|
@interface SettingsAbout : NSViewController
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "SettingsAbout.h"
|
#import "SettingsAbout.h"
|
||||||
#import "SettingsAboutView.h"
|
#import "SettingsAboutView.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
@interface SettingsAboutView : NSView
|
@interface SettingsAboutView : NSView
|
||||||
|
|||||||
@@ -1,32 +1,10 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "SettingsAboutView.h"
|
#import "SettingsAboutView.h"
|
||||||
#import "NSView+Ext.h"
|
#import "NSView+Ext.h"
|
||||||
|
|
||||||
@implementation SettingsAboutView
|
@implementation SettingsAboutView
|
||||||
|
|
||||||
- (instancetype)init {
|
- (instancetype)init {
|
||||||
self = [super initWithFrame: NSZeroRect];
|
self = [super initWithFrame:NSMakeRect(0, 0, 320, 327)];
|
||||||
NSDictionary *info = [[NSBundle mainBundle] infoDictionary];
|
NSDictionary *info = [[NSBundle mainBundle] infoDictionary];
|
||||||
NSString *version = [NSString stringWithFormat:NSLocalizedString(@"Version %@", nil), info[@"CFBundleShortVersionString"]];
|
NSString *version = [NSString stringWithFormat:NSLocalizedString(@"Version %@", nil), info[@"CFBundleShortVersionString"]];
|
||||||
#if DEBUG // append build number, e.g., '0.9.4 (9906)'
|
#if DEBUG // append build number, e.g., '0.9.4 (9906)'
|
||||||
@@ -55,16 +33,16 @@
|
|||||||
NSMutableAttributedString *mas = [NSMutableAttributedString new];
|
NSMutableAttributedString *mas = [NSMutableAttributedString new];
|
||||||
[mas beginEditing];
|
[mas beginEditing];
|
||||||
[self str:mas add:@"Programming\n" bold:YES];
|
[self str:mas add:@"Programming\n" bold:YES];
|
||||||
[self str:mas add:@"Oleg Geier\n\n" bold:NO];
|
[self str:mas add:@"Oleg Geier\n" bold:NO];
|
||||||
[self str:mas add:@"Source Code Available\n" bold:YES];
|
[self str:mas add:@"\nSource Code Available\n" bold:YES];
|
||||||
[self str:mas add:@"github.com" link:@"https://github.com/relikd/baRSS"];
|
[self str:mas add:@"github.com" link:@"https://github.com/relikd/baRSS"];
|
||||||
[self str:mas add:@" (MIT License)\nor " bold:NO];
|
[self str:mas add:@" (MIT License)\n" bold:NO];
|
||||||
[self str:mas add:@"gitlab.com" link:@"https://gitlab.com/relikd/baRSS"];
|
[self str:mas add:@"\nLibraries\n" bold:YES];
|
||||||
[self str:mas add:@" (MIT License)\n\n" bold:NO];
|
|
||||||
[self str:mas add:@"3rd-Party Libraries\n" bold:YES];
|
|
||||||
[self str:mas add:@"RSXML2" link:@"https://github.com/relikd/RSXML2"];
|
[self str:mas add:@"RSXML2" link:@"https://github.com/relikd/RSXML2"];
|
||||||
[self str:mas add:@" (MIT License)" bold:NO];
|
[self str:mas add:@" (MIT License)\n" bold:NO];
|
||||||
[self str:mas add:@"\n\n\n\nOptions\n" bold:YES];
|
[self str:mas add:@"QLOPML" link:@"https://github.com/relikd/QLOPML"];
|
||||||
|
[self str:mas add:@" (MIT License)\n" bold:NO];
|
||||||
|
[self str:mas add:@"\n\n\nOptions\n" bold:YES];
|
||||||
[self str:mas add:@"Fix Cache\n" link:@"barss:config/fixcache"];
|
[self str:mas add:@"Fix Cache\n" link:@"barss:config/fixcache"];
|
||||||
[self str:mas add:@"Backup now\n" link:@"barss:backup/show"];
|
[self str:mas add:@"Backup now\n" link:@"barss:backup/show"];
|
||||||
[mas endEditing];
|
[mas endEditing];
|
||||||
|
|||||||
@@ -1,27 +1,9 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface SettingsAppearance : NSViewController
|
@interface SettingsAppearance : NSViewController
|
||||||
- (void)didSelectCheckbox:(NSButton*)sender;
|
- (void)didSelectCheckbox:(NSButton*)sender;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "SettingsAppearance.h"
|
#import "SettingsAppearance.h"
|
||||||
#import "SettingsAppearanceView.h"
|
#import "SettingsAppearanceView.h"
|
||||||
#import "AppHook.h"
|
#import "AppHook.h"
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
@class SettingsAppearance;
|
@class SettingsAppearance;
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "SettingsAppearanceView.h"
|
#import "SettingsAppearanceView.h"
|
||||||
#import "NSView+Ext.h"
|
#import "NSView+Ext.h"
|
||||||
#import "Constants.h" // column icons
|
#import "Constants.h" // column icons
|
||||||
@@ -38,7 +16,7 @@
|
|||||||
@implementation SettingsAppearanceView
|
@implementation SettingsAppearanceView
|
||||||
|
|
||||||
- (instancetype)init {
|
- (instancetype)init {
|
||||||
self = [super initWithFrame: NSZeroRect];
|
self = [super initWithFrame:NSMakeRect(0, 0, 320, 327)];
|
||||||
// Insert matrix header (icons above checkbox matrix)
|
// Insert matrix header (icons above checkbox matrix)
|
||||||
ColumnIcon(self, X__, RSSImageSettingsGlobal, NSLocalizedString(@"Show in menu bar", nil));
|
ColumnIcon(self, X__, RSSImageSettingsGlobal, NSLocalizedString(@"Show in menu bar", nil));
|
||||||
ColumnIcon(self, _X_, RSSImageSettingsGroup, NSLocalizedString(@"Show in group menu", nil));
|
ColumnIcon(self, _X_, RSSImageSettingsGroup, NSLocalizedString(@"Show in group menu", nil));
|
||||||
@@ -50,6 +28,7 @@
|
|||||||
[self entry:NSLocalizedString(@"Open all unread", nil) c1:Pref_globalOpenUnread c2:Pref_groupOpenUnread c3:Pref_feedOpenUnread];
|
[self entry:NSLocalizedString(@"Open all unread", nil) c1:Pref_globalOpenUnread c2:Pref_groupOpenUnread c3:Pref_feedOpenUnread];
|
||||||
[self entry:NSLocalizedString(@"Mark all read", nil) c1:Pref_globalMarkRead c2:Pref_groupMarkRead c3:Pref_feedMarkRead];
|
[self entry:NSLocalizedString(@"Mark all read", nil) c1:Pref_globalMarkRead c2:Pref_groupMarkRead c3:Pref_feedMarkRead];
|
||||||
[self entry:NSLocalizedString(@"Mark all unread", nil) c1:Pref_globalMarkUnread c2:Pref_groupMarkUnread c3:Pref_feedMarkUnread];
|
[self entry:NSLocalizedString(@"Mark all unread", nil) c1:Pref_globalMarkUnread c2:Pref_groupMarkUnread c3:Pref_feedMarkUnread];
|
||||||
|
[self entry:NSLocalizedString(@"Show only unread / hide read", nil) c1:Pref_globalUnreadOnly c2:Pref_groupUnreadOnly c3:Pref_feedUnreadOnly];
|
||||||
[self entry:NSLocalizedString(@"Number of unread articles", nil) c1:Pref_globalUnreadCount c2:Pref_groupUnreadCount c3:Pref_feedUnreadCount];
|
[self entry:NSLocalizedString(@"Number of unread articles", nil) c1:Pref_globalUnreadCount c2:Pref_groupUnreadCount c3:Pref_feedUnreadCount];
|
||||||
[self entry:NSLocalizedString(@"Indicator for unread articles", nil) c1:nil c2:Pref_groupUnreadIndicator c3:Pref_feedUnreadIndicator];
|
[self entry:NSLocalizedString(@"Indicator for unread articles", nil) c1:nil c2:Pref_groupUnreadIndicator c3:Pref_feedUnreadIndicator];
|
||||||
[[self entry:NSLocalizedString(@"Truncate article title", nil) c1:nil c2:nil c3:Pref_feedTruncateTitle]
|
[[self entry:NSLocalizedString(@"Truncate article title", nil) c1:nil c2:nil c3:Pref_feedTruncateTitle]
|
||||||
|
|||||||
@@ -1,29 +1,9 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
#import "ModalSheet.h"
|
#import "ModalSheet.h"
|
||||||
@class FeedGroup, ModalSheet;
|
@class FeedGroup, ModalSheet;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface ModalEditDialog : NSViewController
|
@interface ModalEditDialog : NSViewController
|
||||||
+ (instancetype)modalWith:(FeedGroup*)group;
|
+ (instancetype)modalWith:(FeedGroup*)group;
|
||||||
- (ModalSheet*)getModalSheet;
|
- (ModalSheet*)getModalSheet;
|
||||||
@@ -38,3 +18,4 @@
|
|||||||
@interface ModalGroupEdit : ModalEditDialog
|
@interface ModalGroupEdit : ModalEditDialog
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import RSXML2;
|
@import RSXML2;
|
||||||
#import "ModalFeedEdit.h"
|
#import "ModalFeedEdit.h"
|
||||||
#import "ModalFeedEditView.h"
|
#import "ModalFeedEditView.h"
|
||||||
@@ -162,7 +140,7 @@
|
|||||||
|
|
||||||
@return Either URL string or @c nil if user canceled the selection.
|
@return Either URL string or @c nil if user canceled the selection.
|
||||||
*/
|
*/
|
||||||
- (NSString*)feedDownload:(FeedDownload*)sender selectFeedFromList:(NSArray<RSHTMLMetadataFeedLink*>*)list {
|
- (nullable NSString*)feedDownload:(FeedDownload*)sender selectFeedFromList:(NSArray<RSHTMLMetadataFeedLink*>*)list {
|
||||||
NSMenu *menu = [[NSMenu alloc] initWithTitle:NSLocalizedString(@"Choose feed menu", nil)];
|
NSMenu *menu = [[NSMenu alloc] initWithTitle:NSLocalizedString(@"Choose feed menu", nil)];
|
||||||
menu.autoenablesItems = NO;
|
menu.autoenablesItems = NO;
|
||||||
for (RSHTMLMetadataFeedLink *fl in list) {
|
for (RSHTMLMetadataFeedLink *fl in list) {
|
||||||
@@ -216,7 +194,13 @@
|
|||||||
*/
|
*/
|
||||||
- (void)faviconDownload:(FaviconDownload*)sender didFinish:(nullable NSURL*)path {
|
- (void)faviconDownload:(FaviconDownload*)sender didFinish:(nullable NSURL*)path {
|
||||||
// Create image from favicon temporary file location or default icon if no favicon exists.
|
// Create image from favicon temporary file location or default icon if no favicon exists.
|
||||||
NSImage *img = path ? [[NSImage alloc] initByReferencingURL:path] : [NSImage imageNamed:RSSImageDefaultRSSIcon];
|
NSImage *img;
|
||||||
|
if (path) {
|
||||||
|
NSData* data = [[NSData alloc] initWithContentsOfURL:path];
|
||||||
|
img = [[NSImage alloc] initWithData:data];
|
||||||
|
} else {
|
||||||
|
img = [NSImage imageNamed:RSSImageDefaultRSSIcon];
|
||||||
|
}
|
||||||
self.view.favicon.image = img;
|
self.view.favicon.image = img;
|
||||||
self.faviconFile = path;
|
self.faviconFile = path;
|
||||||
[self downloadComplete];
|
[self downloadComplete];
|
||||||
|
|||||||
@@ -1,28 +1,8 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
@class ModalFeedEdit;
|
@class ModalFeedEdit;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface ModalFeedEditView : NSView
|
@interface ModalFeedEditView : NSView
|
||||||
@property (strong) IBOutlet NSTextField *url;
|
@property (strong) IBOutlet NSTextField *url;
|
||||||
@property (strong) IBOutlet NSProgressIndicator *spinnerURL;
|
@property (strong) IBOutlet NSProgressIndicator *spinnerURL;
|
||||||
@@ -43,3 +23,5 @@
|
|||||||
- (instancetype)initWithFrame:(NSRect)frameRect NS_UNAVAILABLE;
|
- (instancetype)initWithFrame:(NSRect)frameRect NS_UNAVAILABLE;
|
||||||
- (nullable instancetype)initWithCoder:(NSCoder *)decoder NS_UNAVAILABLE;
|
- (nullable instancetype)initWithCoder:(NSCoder *)decoder NS_UNAVAILABLE;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "ModalFeedEditView.h"
|
#import "ModalFeedEditView.h"
|
||||||
#import "ModalFeedEdit.h"
|
#import "ModalFeedEdit.h"
|
||||||
#import "NSView+Ext.h"
|
#import "NSView+Ext.h"
|
||||||
@@ -36,7 +14,7 @@
|
|||||||
NSView *labels = [NSView labelColumn:lbls rowHeight:HEIGHT_INPUTFIELD padding:PAD_S];
|
NSView *labels = [NSView labelColumn:lbls rowHeight:HEIGHT_INPUTFIELD padding:PAD_S];
|
||||||
|
|
||||||
|
|
||||||
self = [super initWithFrame:NSMakeRect(0, 0, 0, NSHeight(labels.frame))];
|
self = [super initWithFrame:NSMakeRect(0, 0, 320, NSHeight(labels.frame))];
|
||||||
self.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
self.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
||||||
|
|
||||||
CGFloat x = NSWidth(labels.frame) + PAD_S;
|
CGFloat x = NSWidth(labels.frame) + PAD_S;
|
||||||
|
|||||||
@@ -1,27 +1,7 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@protocol RefreshIntervalButtonDelegate <NSObject>
|
@protocol RefreshIntervalButtonDelegate <NSObject>
|
||||||
@required
|
@required
|
||||||
/// @c sender.tag is refresh interval in seconds
|
/// @c sender.tag is refresh interval in seconds
|
||||||
@@ -34,3 +14,5 @@
|
|||||||
- (instancetype)initWithFrame:(NSRect)frameRect NS_UNAVAILABLE;
|
- (instancetype)initWithFrame:(NSRect)frameRect NS_UNAVAILABLE;
|
||||||
- (nullable instancetype)initWithCoder:(NSCoder *)decoder NS_UNAVAILABLE;
|
- (nullable instancetype)initWithCoder:(NSCoder *)decoder NS_UNAVAILABLE;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "RefreshStatisticsView.h"
|
#import "RefreshStatisticsView.h"
|
||||||
#import "NSDate+Ext.h"
|
#import "NSDate+Ext.h"
|
||||||
#import "NSView+Ext.h"
|
#import "NSView+Ext.h"
|
||||||
@@ -36,7 +14,7 @@
|
|||||||
@return Centered view without autoresizing.
|
@return Centered view without autoresizing.
|
||||||
*/
|
*/
|
||||||
- (instancetype)initWithRefreshInterval:(NSDictionary*)info articleCount:(NSUInteger)count callback:(nullable id<RefreshIntervalButtonDelegate>)callback {
|
- (instancetype)initWithRefreshInterval:(NSDictionary*)info articleCount:(NSUInteger)count callback:(nullable id<RefreshIntervalButtonDelegate>)callback {
|
||||||
self = [super initWithFrame:NSZeroRect];
|
self = [super initWithFrame:NSMakeRect(0, 0, 320, 327)];
|
||||||
self.autoresizesSubviews = NO;
|
self.autoresizesSubviews = NO;
|
||||||
|
|
||||||
NSTextField *dateView = [self viewForArticlesCount:count latest:info];
|
NSTextField *dateView = [self viewForArticlesCount:count latest:info];
|
||||||
|
|||||||
@@ -1,29 +1,11 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "SettingsFeeds.h"
|
#import "SettingsFeeds.h"
|
||||||
#import "OpmlFile.h"
|
#import "OpmlFile.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface SettingsFeeds (DragDrop) <NSOutlineViewDataSource, NSFilePromiseProviderDelegate, NSPasteboardTypeOwner, OpmlFileImportDelegate, OpmlFileExportDelegate>
|
@interface SettingsFeeds (DragDrop) <NSOutlineViewDataSource, NSFilePromiseProviderDelegate, NSPasteboardTypeOwner, OpmlFileImportDelegate, OpmlFileExportDelegate>
|
||||||
- (void)prepareOutlineViewForDragDrop:(NSOutlineView*)outline;
|
- (void)prepareOutlineViewForDragDrop:(NSOutlineView*)outline;
|
||||||
- (void)importOpmlFiles:(NSArray<NSURL*>*)files;
|
- (void)importOpmlFiles:(NSArray<NSURL*>*)files;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "SettingsFeeds+DragDrop.h"
|
#import "SettingsFeeds+DragDrop.h"
|
||||||
#import "StoreCoordinator.h"
|
#import "StoreCoordinator.h"
|
||||||
#import "Constants.h"
|
#import "Constants.h"
|
||||||
|
|||||||
@@ -1,31 +1,11 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/** Manages the NSOutlineView and Feed creation and editing */
|
/** Manages the NSOutlineView and Feed creation and editing */
|
||||||
@interface SettingsFeeds : NSViewController <NSOutlineViewDelegate>
|
@interface SettingsFeeds : NSViewController <NSOutlineViewDelegate>
|
||||||
@property (strong) NSTreeController *dataStore;
|
@property (strong) NSTreeController *dataStore;
|
||||||
@property (strong) NSArray<NSTreeNode*> *currentlyDraggedNodes;
|
@property (strong, nullable) NSArray<NSTreeNode*> *currentlyDraggedNodes;
|
||||||
|
|
||||||
- (void)editSelectedItem;
|
- (void)editSelectedItem;
|
||||||
- (void)doubleClickOutlineView:(NSOutlineView*)sender;
|
- (void)doubleClickOutlineView:(NSOutlineView*)sender;
|
||||||
@@ -40,3 +20,5 @@
|
|||||||
- (BOOL)endCoreDataChangeUndoEmpty:(BOOL)undoEmpty forceUndo:(BOOL)force;
|
- (BOOL)endCoreDataChangeUndoEmpty:(BOOL)undoEmpty forceUndo:(BOOL)force;
|
||||||
- (void)restoreOrderingAndIndexPathStr:(NSArray<NSTreeNode*>*)parentsList;
|
- (void)restoreOrderingAndIndexPathStr:(NSArray<NSTreeNode*>*)parentsList;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "SettingsFeeds+DragDrop.h"
|
#import "SettingsFeeds+DragDrop.h"
|
||||||
#import "Constants.h"
|
#import "Constants.h"
|
||||||
#import "StoreCoordinator.h"
|
#import "StoreCoordinator.h"
|
||||||
|
|||||||
@@ -1,28 +1,8 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
@class SettingsFeeds;
|
@class SettingsFeeds;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface SettingsFeedsView : NSView
|
@interface SettingsFeedsView : NSView
|
||||||
@property (strong) IBOutlet NSOutlineView *outline;
|
@property (strong) IBOutlet NSOutlineView *outline;
|
||||||
@property (strong) IBOutlet NSTextField *status;
|
@property (strong) IBOutlet NSTextField *status;
|
||||||
@@ -45,3 +25,5 @@ extern NSUserInterfaceItemIdentifier const CustomCellRefresh;
|
|||||||
@interface SeparatorColumnCell : NSTableCellView
|
@interface SeparatorColumnCell : NSTableCellView
|
||||||
extern NSUserInterfaceItemIdentifier const CustomCellSeparator;
|
extern NSUserInterfaceItemIdentifier const CustomCellSeparator;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "SettingsFeedsView.h"
|
#import "SettingsFeedsView.h"
|
||||||
#import "StoreCoordinator.h"
|
#import "StoreCoordinator.h"
|
||||||
#import "FeedGroup+Ext.h"
|
#import "FeedGroup+Ext.h"
|
||||||
@@ -35,7 +13,7 @@
|
|||||||
@implementation SettingsFeedsView
|
@implementation SettingsFeedsView
|
||||||
|
|
||||||
- (instancetype)initWithController:(SettingsFeeds*)delegate {
|
- (instancetype)initWithController:(SettingsFeeds*)delegate {
|
||||||
self = [super initWithFrame:NSZeroRect];
|
self = [super initWithFrame:NSMakeRect(0, 0, 201, 327)];
|
||||||
if (self) {
|
if (self) {
|
||||||
self.controller = delegate; // make sure its first
|
self.controller = delegate; // make sure its first
|
||||||
self.outline = [self generateOutlineView]; // uses self.controller
|
self.outline = [self generateOutlineView]; // uses self.controller
|
||||||
@@ -82,7 +60,7 @@
|
|||||||
- (void)setOutlineColumns:(NSOutlineView*)outline {
|
- (void)setOutlineColumns:(NSOutlineView*)outline {
|
||||||
NSTableColumn *colName = [[NSTableColumn alloc] initWithIdentifier:CustomCellName];
|
NSTableColumn *colName = [[NSTableColumn alloc] initWithIdentifier:CustomCellName];
|
||||||
colName.title = NSLocalizedString(@"Name", nil);
|
colName.title = NSLocalizedString(@"Name", nil);
|
||||||
colName.width = 10000;
|
colName.width = 201;
|
||||||
colName.maxWidth = 10000;
|
colName.maxWidth = 10000;
|
||||||
colName.resizingMask = NSTableColumnAutoresizingMask;
|
colName.resizingMask = NSTableColumnAutoresizingMask;
|
||||||
[outline addTableColumn:colName];
|
[outline addTableColumn:colName];
|
||||||
|
|||||||
@@ -1,28 +1,10 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface SettingsGeneral : NSViewController
|
@interface SettingsGeneral : NSViewController
|
||||||
- (void)changeHttpApplication:(NSPopUpButton *)sender;
|
- (void)changeHttpApplication:(NSPopUpButton *)sender;
|
||||||
- (void)clickHowToDefaults:(NSButton *)sender;
|
- (void)clickHowToDefaults:(NSButton *)sender;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "SettingsGeneral.h"
|
#import "SettingsGeneral.h"
|
||||||
#import "UserPrefs.h"
|
#import "UserPrefs.h"
|
||||||
#import "StoreCoordinator.h"
|
#import "StoreCoordinator.h"
|
||||||
|
|||||||
@@ -1,28 +1,8 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
@class SettingsGeneral;
|
@class SettingsGeneral;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface SettingsGeneralView : NSView
|
@interface SettingsGeneralView : NSView
|
||||||
@property (strong) IBOutlet NSPopUpButton* popupHttpApplication;
|
@property (strong) IBOutlet NSPopUpButton* popupHttpApplication;
|
||||||
@property (strong) IBOutlet NSTextField *defaultReader;
|
@property (strong) IBOutlet NSTextField *defaultReader;
|
||||||
@@ -32,3 +12,4 @@
|
|||||||
- (nullable instancetype)initWithCoder:(NSCoder *)decoder NS_UNAVAILABLE;
|
- (nullable instancetype)initWithCoder:(NSCoder *)decoder NS_UNAVAILABLE;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "SettingsGeneralView.h"
|
#import "SettingsGeneralView.h"
|
||||||
#import "SettingsGeneral.h"
|
#import "SettingsGeneral.h"
|
||||||
#import "NSView+Ext.h"
|
#import "NSView+Ext.h"
|
||||||
@@ -27,7 +5,7 @@
|
|||||||
@implementation SettingsGeneralView
|
@implementation SettingsGeneralView
|
||||||
|
|
||||||
- (instancetype)initWithController:(SettingsGeneral*)controller {
|
- (instancetype)initWithController:(SettingsGeneral*)controller {
|
||||||
self = [super initWithFrame:NSZeroRect];
|
self = [super initWithFrame:NSMakeRect(0, 0, 320, 327)];
|
||||||
// Change default feed reader application
|
// Change default feed reader application
|
||||||
NSTextField *l1 = [[NSView label:NSLocalizedString(@"Default feed reader:", nil)] placeIn:self x:PAD_WIN yTop:PAD_WIN + 3];
|
NSTextField *l1 = [[NSView label:NSLocalizedString(@"Default feed reader:", nil)] placeIn:self x:PAD_WIN yTop:PAD_WIN + 3];
|
||||||
NSButton *help = [[[NSView helpButton] action:@selector(clickHowToDefaults:) target:controller] placeIn:self xRight:PAD_WIN yTop:PAD_WIN];
|
NSButton *help = [[[NSView helpButton] action:@selector(clickHowToDefaults:) target:controller] placeIn:self xRight:PAD_WIN yTop:PAD_WIN];
|
||||||
|
|||||||
@@ -1,27 +1,7 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface ModalSheet : NSPanel
|
@interface ModalSheet : NSPanel
|
||||||
@property (readonly) BOOL didTapCancel;
|
@property (readonly) BOOL didTapCancel;
|
||||||
|
|
||||||
@@ -31,3 +11,5 @@
|
|||||||
- (void)setDoneEnabled:(BOOL)accept;
|
- (void)setDoneEnabled:(BOOL)accept;
|
||||||
- (void)extendContentViewBy:(CGFloat)dy;
|
- (void)extendContentViewBy:(CGFloat)dy;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "ModalSheet.h"
|
#import "ModalSheet.h"
|
||||||
#import "UserPrefs.h"
|
#import "UserPrefs.h"
|
||||||
#import "NSView+Ext.h"
|
#import "NSView+Ext.h"
|
||||||
@@ -44,7 +22,7 @@
|
|||||||
[content setFrameSize: NSMakeSize(w, h)];
|
[content setFrameSize: NSMakeSize(w, h)];
|
||||||
|
|
||||||
// after content size, increase to window size
|
// after content size, increase to window size
|
||||||
w += 2 * PAD_WIN;
|
w += 2 * (NSInteger)PAD_WIN;
|
||||||
h += PAD_WIN + contentOffsetY; // the second PAD_WIN is already in contentOffsetY
|
h += PAD_WIN + contentOffsetY; // the second PAD_WIN is already in contentOffsetY
|
||||||
|
|
||||||
NSWindowStyleMask style = NSWindowStyleMaskTitled | NSWindowStyleMaskResizable | NSWindowStyleMaskFullSizeContentView;
|
NSWindowStyleMask style = NSWindowStyleMaskTitled | NSWindowStyleMaskResizable | NSWindowStyleMaskFullSizeContentView;
|
||||||
|
|||||||
@@ -1,29 +1,11 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
@class SettingsFeeds;
|
@class SettingsFeeds;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface Preferences : NSWindow <NSWindowDelegate>
|
@interface Preferences : NSWindow <NSWindowDelegate>
|
||||||
+ (instancetype)window;
|
+ (instancetype)window;
|
||||||
- (__kindof NSViewController*)selectTab:(NSUInteger)index;
|
- (__kindof NSViewController*)selectTab:(NSUInteger)index;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "Preferences.h"
|
#import "Preferences.h"
|
||||||
#import "SettingsGeneral.h"
|
#import "SettingsGeneral.h"
|
||||||
#import "SettingsFeeds.h"
|
#import "SettingsFeeds.h"
|
||||||
@@ -38,18 +16,13 @@
|
|||||||
if (self) {
|
if (self) {
|
||||||
self.tabStyle = NSTabViewControllerTabStyleToolbar;
|
self.tabStyle = NSTabViewControllerTabStyleToolbar;
|
||||||
self.transitionOptions = NSViewControllerTransitionNone;
|
self.transitionOptions = NSViewControllerTransitionNone;
|
||||||
|
|
||||||
NSTabViewItem *flexibleWidth = [[NSTabViewItem alloc] initWithIdentifier:NSToolbarFlexibleSpaceItemIdentifier];
|
|
||||||
flexibleWidth.viewController = [NSViewController new];
|
|
||||||
|
|
||||||
self.tabViewItems = @[
|
self.tabViewItems = @[
|
||||||
TabItem(NSImageNamePreferencesGeneral, NSLocalizedString(@"General", nil), [SettingsGeneral class]),
|
TabItem(NSImageNamePreferencesGeneral, NSLocalizedString(@"General", nil), [SettingsGeneral class]),
|
||||||
TabItem(NSImageNameUserAccounts, NSLocalizedString(@"Feeds", nil), [SettingsFeeds class]),
|
TabItem(NSImageNameUserAccounts, NSLocalizedString(@"Feeds", nil), [SettingsFeeds class]),
|
||||||
TabItem(NSImageNameFontPanel, NSLocalizedString(@"Appearance", nil), [SettingsAppearance class]),
|
TabItem(NSImageNameFontPanel, NSLocalizedString(@"Appearance", nil), [SettingsAppearance class]),
|
||||||
flexibleWidth,
|
|
||||||
TabItem(NSImageNameInfo, NSLocalizedString(@"About", nil), [SettingsAbout class]),
|
TabItem(NSImageNameInfo, NSLocalizedString(@"About", nil), [SettingsAbout class]),
|
||||||
];
|
];
|
||||||
[self switchToTab: UserPrefsUInt(Pref_prefSelectedTab)];
|
self.selectedTabViewItemIndex = -1;
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
@@ -65,19 +38,16 @@ static inline NSTabViewItem* TabItem(NSImageName imageName, NSString *text, Clas
|
|||||||
/// Safely set selected index without out of bounds exception
|
/// Safely set selected index without out of bounds exception
|
||||||
- (__kindof NSViewController*)switchToTab:(NSUInteger)index {
|
- (__kindof NSViewController*)switchToTab:(NSUInteger)index {
|
||||||
if (index < 0 || index >= self.tabViewItems.count)
|
if (index < 0 || index >= self.tabViewItems.count)
|
||||||
return nil;
|
index = 0;
|
||||||
NSTabViewItem *tab = self.tabViewItems[index];
|
|
||||||
if (tab.identifier == NSToolbarFlexibleSpaceItemIdentifier)
|
|
||||||
return nil;
|
|
||||||
self.selectedTabViewItemIndex = (NSInteger)index;
|
self.selectedTabViewItemIndex = (NSInteger)index;
|
||||||
return [tab viewController];
|
return [self.tabViewItems[index] viewController];
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Delegate method, store last selected tab to user preferences
|
/// Delegate method, store last selected tab to user preferences
|
||||||
- (void)tabView:(NSTabView*)tabView didSelectTabViewItem:(nullable NSTabViewItem*)tabViewItem {
|
- (void)tabView:(NSTabView*)tabView didSelectTabViewItem:(nullable NSTabViewItem*)tabViewItem {
|
||||||
[super tabView:tabView didSelectTabViewItem:tabViewItem];
|
[super tabView:tabView didSelectTabViewItem:tabViewItem];
|
||||||
NSInteger newIndex = self.selectedTabViewItemIndex;
|
NSInteger newIndex = self.selectedTabViewItemIndex;
|
||||||
if (UserPrefsInt(Pref_prefSelectedTab) != newIndex)
|
if (newIndex != -1 && UserPrefsInt(Pref_prefSelectedTab) != newIndex)
|
||||||
UserPrefsSetInt(Pref_prefSelectedTab, newIndex);
|
UserPrefsSetInt(Pref_prefSelectedTab, newIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +62,10 @@ static inline NSTabViewItem* TabItem(NSImageName imageName, NSString *text, Clas
|
|||||||
w.contentMinSize = NSMakeSize(320, 327);
|
w.contentMinSize = NSMakeSize(320, 327);
|
||||||
w.windowController.shouldCascadeWindows = YES;
|
w.windowController.shouldCascadeWindows = YES;
|
||||||
w.title = [NSString stringWithFormat:NSLocalizedString(@"%@ Preferences", nil), NSProcessInfo.processInfo.processName];
|
w.title = [NSString stringWithFormat:NSLocalizedString(@"%@ Preferences", nil), NSProcessInfo.processInfo.processName];
|
||||||
w.contentViewController = [PrefTabs new];
|
PrefTabs *tabController = [PrefTabs new];
|
||||||
|
w.contentViewController = tabController;
|
||||||
|
[w.toolbar insertItemWithItemIdentifier:NSToolbarSpaceItemIdentifier atIndex:3];
|
||||||
|
[w.toolbar insertItemWithItemIdentifier:NSToolbarFlexibleSpaceItemIdentifier atIndex:4];
|
||||||
w.delegate = w;
|
w.delegate = w;
|
||||||
NSWindowPersistableFrameDescriptor prevFrame = UserPrefsString(Pref_prefWindowFrame);
|
NSWindowPersistableFrameDescriptor prevFrame = UserPrefsString(Pref_prefWindowFrame);
|
||||||
if (!prevFrame) {
|
if (!prevFrame) {
|
||||||
@@ -101,6 +74,7 @@ static inline NSTabViewItem* TabItem(NSImageName imageName, NSString *text, Clas
|
|||||||
} else {
|
} else {
|
||||||
[w setFrameFromString:prevFrame];
|
[w setFrameFromString:prevFrame];
|
||||||
}
|
}
|
||||||
|
[tabController switchToTab:UserPrefsUInt(Pref_prefSelectedTab)];
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +1,11 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
@class BarStatusItem;
|
@class BarStatusItem;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface BarMenu : NSObject <NSMenuDelegate>
|
@interface BarMenu : NSObject <NSMenuDelegate>
|
||||||
- (instancetype)init NS_UNAVAILABLE;
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
- (instancetype)initWithStatusItem:(BarStatusItem*)statusItem NS_DESIGNATED_INITIALIZER;
|
- (instancetype)initWithStatusItem:(BarStatusItem*)statusItem NS_DESIGNATED_INITIALIZER;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "BarMenu.h"
|
#import "BarMenu.h"
|
||||||
#import "Constants.h"
|
#import "Constants.h"
|
||||||
#import "UserPrefs.h"
|
#import "UserPrefs.h"
|
||||||
@@ -86,15 +64,10 @@
|
|||||||
- (void)setFeedGroups:(NSArray<FeedGroup*>*)sortedList forMenu:(NSMenu*)menu {
|
- (void)setFeedGroups:(NSArray<FeedGroup*>*)sortedList forMenu:(NSMenu*)menu {
|
||||||
[menu insertDefaultHeader];
|
[menu insertDefaultHeader];
|
||||||
for (FeedGroup *fg in sortedList) {
|
for (FeedGroup *fg in sortedList) {
|
||||||
[menu insertFeedGroupItem:fg].submenu.delegate = self;
|
[menu insertFeedGroupItem:fg withUnread:self.unreadMap].submenu.delegate = self;
|
||||||
}
|
}
|
||||||
UnreadTotal *uct = self.unreadMap[menu.titleIndexPath];
|
UnreadTotal *uct = self.unreadMap[menu.titleIndexPath];
|
||||||
[menu setHeaderHasUnread:(uct.unread > 0) hasRead:(uct.unread < uct.total)];
|
[menu setHeaderHasUnread:(uct.unread > 0) hasRead:(uct.unread < uct.total)];
|
||||||
// set unread counts
|
|
||||||
for (NSMenuItem *item in menu.itemArray) {
|
|
||||||
if (item.hasSubmenu)
|
|
||||||
[item setTitleCount:self.unreadMap[item.submenu.titleIndexPath].unread];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Generate items for @c FeedArticles menu.
|
/// Generate items for @c FeedArticles menu.
|
||||||
@@ -103,8 +76,11 @@
|
|||||||
NSInteger mc = NSIntegerMax;
|
NSInteger mc = NSIntegerMax;
|
||||||
if (UserPrefsBool(Pref_feedLimitArticles))
|
if (UserPrefsBool(Pref_feedLimitArticles))
|
||||||
mc = UserPrefsInt(Pref_articlesInMenuLimit);
|
mc = UserPrefsInt(Pref_articlesInMenuLimit);
|
||||||
|
BOOL onlyUnread = UserPrefsBool(Pref_feedUnreadOnly);
|
||||||
|
|
||||||
for (FeedArticle *fa in sortedList) {
|
for (FeedArticle *fa in sortedList) {
|
||||||
|
if (onlyUnread && !fa.unread)
|
||||||
|
continue;
|
||||||
if (--mc < 0) // mc == 0 will first decrement to -1, then evaluate
|
if (--mc < 0) // mc == 0 will first decrement to -1, then evaluate
|
||||||
break;
|
break;
|
||||||
[menu addItem:[fa newMenuItem]];
|
[menu addItem:[fa newMenuItem]];
|
||||||
@@ -159,6 +135,7 @@
|
|||||||
[item setTitleCount:uct.unread];
|
[item setTitleCount:uct.unread];
|
||||||
item = item.parentItem;
|
item = item.parentItem;
|
||||||
}
|
}
|
||||||
|
// TODO: need to re-create groups if user chose to hide already read articles
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,7 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface BarStatusItem : NSObject
|
@interface BarStatusItem : NSObject
|
||||||
@property (weak, readonly) NSMenu *mainMenu;
|
@property (weak, readonly) NSMenu *mainMenu;
|
||||||
|
|
||||||
@@ -32,3 +12,4 @@
|
|||||||
- (void)showWelcomeMessage;
|
- (void)showWelcomeMessage;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "BarStatusItem.h"
|
#import "BarStatusItem.h"
|
||||||
#import "Constants.h"
|
#import "Constants.h"
|
||||||
#import "UpdateScheduler.h"
|
#import "UpdateScheduler.h"
|
||||||
@@ -28,6 +6,7 @@
|
|||||||
#import "BarMenu.h"
|
#import "BarMenu.h"
|
||||||
#import "AppHook.h"
|
#import "AppHook.h"
|
||||||
#import "NSView+Ext.h"
|
#import "NSView+Ext.h"
|
||||||
|
#import "NSColor+Ext.h"
|
||||||
|
|
||||||
@interface BarStatusItem()
|
@interface BarStatusItem()
|
||||||
@property (strong) BarMenu *barMenu;
|
@property (strong) BarMenu *barMenu;
|
||||||
@@ -119,8 +98,22 @@
|
|||||||
BOOL hasNet = [UpdateScheduler allowNetworkConnection];
|
BOOL hasNet = [UpdateScheduler allowNetworkConnection];
|
||||||
BOOL tint = (self.unreadCountTotal > 0 && hasNet && UserPrefsBool(Pref_globalTintMenuIcon));
|
BOOL tint = (self.unreadCountTotal > 0 && hasNet && UserPrefsBool(Pref_globalTintMenuIcon));
|
||||||
self.statusItem.button.image = [NSImage imageNamed:(hasNet ? RSSImageMenuBarIconActive : RSSImageMenuBarIconPaused)];
|
self.statusItem.button.image = [NSImage imageNamed:(hasNet ? RSSImageMenuBarIconActive : RSSImageMenuBarIconPaused)];
|
||||||
|
|
||||||
|
if (@available(macOS 11, *)) {
|
||||||
self.statusItem.button.image.template = !tint;
|
self.statusItem.button.image.template = !tint;
|
||||||
// TODO: use macOS 10.14 contentTintColor, if (@available(macOS 10.14, *)) {} else {}
|
} else if (@available(macOS 10.14, *)) {
|
||||||
|
// There is no proper way to display tinted icon WITHOUT tinted text!
|
||||||
|
// - using alternate image instead of tint:
|
||||||
|
// icon & text stays black on highlight (but only in light mode)
|
||||||
|
// - using tint and attributed titles:
|
||||||
|
// with controlTextColor the tint is applied regardless
|
||||||
|
// with controlColor the color doesnt match (either normal or on highlight)
|
||||||
|
// also, setting attributed title kills tint on icon
|
||||||
|
self.statusItem.button.image.template = YES;
|
||||||
|
self.statusItem.button.contentTintColor = tint ? [NSColor menuBarIconColor] : nil;
|
||||||
|
} else {
|
||||||
|
self.statusItem.button.image.template = !tint;
|
||||||
|
}
|
||||||
|
|
||||||
BOOL showCount = (self.unreadCountTotal > 0 && UserPrefsBool(Pref_globalUnreadCount));
|
BOOL showCount = (self.unreadCountTotal > 0 && UserPrefsBool(Pref_globalUnreadCount));
|
||||||
self.statusItem.button.title = (showCount ? [NSString stringWithFormat:@"%ld", self.unreadCountTotal] : @"");
|
self.statusItem.button.title = (showCount ? [NSString stringWithFormat:@"%ld", self.unreadCountTotal] : @"");
|
||||||
|
|||||||
@@ -1,27 +1,7 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface UnreadTotal : NSObject
|
@interface UnreadTotal : NSObject
|
||||||
@property (nonatomic, assign) NSUInteger unread;
|
@property (nonatomic, assign) NSUInteger unread;
|
||||||
@property (nonatomic, assign) NSUInteger total;
|
@property (nonatomic, assign) NSUInteger total;
|
||||||
@@ -39,3 +19,5 @@
|
|||||||
- (UnreadTotal*)objectForKeyedSubscript:(NSString*)key;
|
- (UnreadTotal*)objectForKeyedSubscript:(NSString*)key;
|
||||||
- (void)setObject:(UnreadTotal*)obj forKeyedSubscript:(NSString*)key;
|
- (void)setObject:(UnreadTotal*)obj forKeyedSubscript:(NSString*)key;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2019 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "MapUnreadTotal.h"
|
#import "MapUnreadTotal.h"
|
||||||
|
|
||||||
@interface MapUnreadTotal()
|
@interface MapUnreadTotal()
|
||||||
|
|||||||
@@ -1,27 +1,7 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
@class FeedGroup;
|
@class FeedGroup, MapUnreadTotal;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface NSMenu (Ext)
|
@interface NSMenu (Ext)
|
||||||
@property (nonnull, copy, readonly) NSString *titleIndexPath;
|
@property (nonnull, copy, readonly) NSString *titleIndexPath;
|
||||||
@@ -30,11 +10,11 @@
|
|||||||
@property (readonly) BOOL isFeedMenu;
|
@property (readonly) BOOL isFeedMenu;
|
||||||
|
|
||||||
// Generator
|
// Generator
|
||||||
- (NSMenuItem*)insertFeedGroupItem:(FeedGroup*)fg;
|
- (nullable NSMenuItem*)insertFeedGroupItem:(FeedGroup*)fg withUnread:(MapUnreadTotal*)unreadMap;
|
||||||
- (void)insertDefaultHeader;
|
- (void)insertDefaultHeader;
|
||||||
// Update menu
|
// Update menu
|
||||||
- (void)setHeaderHasUnread:(BOOL)hasUnread hasRead:(BOOL)hasRead;
|
- (void)setHeaderHasUnread:(BOOL)hasUnread hasRead:(BOOL)hasRead;
|
||||||
- (NSMenuItem*)deepestItemWithPath:(nonnull NSString*)path;
|
- (nullable NSMenuItem*)deepestItemWithPath:(nonnull NSString*)path;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
@@ -42,3 +22,5 @@
|
|||||||
- (instancetype)alternateWithTitle:(NSString*)title;
|
- (instancetype)alternateWithTitle:(NSString*)title;
|
||||||
- (void)setTitleCount:(NSUInteger)count;
|
- (void)setTitleCount:(NSUInteger)count;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1,31 +1,10 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "NSMenu+Ext.h"
|
#import "NSMenu+Ext.h"
|
||||||
#import "StoreCoordinator.h"
|
#import "StoreCoordinator.h"
|
||||||
#import "UserPrefs.h"
|
#import "UserPrefs.h"
|
||||||
#import "Feed+Ext.h"
|
#import "Feed+Ext.h"
|
||||||
#import "FeedGroup+Ext.h"
|
#import "FeedGroup+Ext.h"
|
||||||
#import "Constants.h"
|
#import "Constants.h"
|
||||||
|
#import "MapUnreadTotal.h"
|
||||||
|
|
||||||
typedef NS_ENUM(NSInteger, MenuItemTag) {
|
typedef NS_ENUM(NSInteger, MenuItemTag) {
|
||||||
/// Used in @c allowDisplayOfHeaderItem: to identify and enable items
|
/// Used in @c allowDisplayOfHeaderItem: to identify and enable items
|
||||||
@@ -67,7 +46,7 @@ typedef NS_ENUM(NSInteger, MenuItemTag) {
|
|||||||
#pragma mark - Generator -
|
#pragma mark - Generator -
|
||||||
|
|
||||||
/// Create new @c NSMenuItem with empty submenu and append it to the menu. @return Inserted item.
|
/// Create new @c NSMenuItem with empty submenu and append it to the menu. @return Inserted item.
|
||||||
- (NSMenuItem*)insertFeedGroupItem:(FeedGroup*)fg {
|
- (nullable NSMenuItem*)insertFeedGroupItem:(FeedGroup*)fg withUnread:(MapUnreadTotal*)unreadMap {
|
||||||
unichar chr = '-';
|
unichar chr = '-';
|
||||||
NSMenuItem *item = nil;
|
NSMenuItem *item = nil;
|
||||||
switch (fg.type) {
|
switch (fg.type) {
|
||||||
@@ -77,7 +56,17 @@ typedef NS_ENUM(NSInteger, MenuItemTag) {
|
|||||||
}
|
}
|
||||||
if (!item.isSeparatorItem) {
|
if (!item.isSeparatorItem) {
|
||||||
NSString *t = [NSString stringWithFormat:@"%c%@.%d", chr, [self.title substringFromIndex:1], fg.sortIndex];
|
NSString *t = [NSString stringWithFormat:@"%c%@.%d", chr, [self.title substringFromIndex:1], fg.sortIndex];
|
||||||
|
NSUInteger unread = unreadMap[[t substringFromIndex:2]].unread;
|
||||||
|
|
||||||
|
// Check user preferences to show only unread entries
|
||||||
|
if (unread == 0 &&
|
||||||
|
((fg.type == FEED && UserPrefsBool(Pref_groupUnreadOnly)) ||
|
||||||
|
(fg.type == GROUP && UserPrefsBool(Pref_globalUnreadOnly)))) {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
item.submenu = [[NSMenu alloc] initWithTitle:t];
|
item.submenu = [[NSMenu alloc] initWithTitle:t];
|
||||||
|
[item setTitleCount:unread];
|
||||||
}
|
}
|
||||||
[self addItem:item];
|
[self addItem:item];
|
||||||
return item;
|
return item;
|
||||||
@@ -127,7 +116,7 @@ typedef NS_ENUM(NSInteger, MenuItemTag) {
|
|||||||
@param path Dot separated list of @c sortIndex. E.g., @c Feed.indexPath.
|
@param path Dot separated list of @c sortIndex. E.g., @c Feed.indexPath.
|
||||||
@return Either @c NSMenuItem that exactly matches @c path or one of the parent @c NSMenuItem if a submenu isn't open.
|
@return Either @c NSMenuItem that exactly matches @c path or one of the parent @c NSMenuItem if a submenu isn't open.
|
||||||
*/
|
*/
|
||||||
- (NSMenuItem*)deepestItemWithPath:(nonnull NSString*)path {
|
- (nullable NSMenuItem*)deepestItemWithPath:(nonnull NSString*)path {
|
||||||
NSUInteger loc = [path rangeOfString:@"."].location;
|
NSUInteger loc = [path rangeOfString:@"."].location;
|
||||||
BOOL isLast = (loc == NSNotFound);
|
BOOL isLast = (loc == NSNotFound);
|
||||||
NSString *indexStr = (isLast ? path : [path substringToIndex:loc]);
|
NSString *indexStr = (isLast ? path : [path substringToIndex:loc]);
|
||||||
|
|||||||
22
baRSS/main.m
22
baRSS/main.m
@@ -1,25 +1,3 @@
|
|||||||
//
|
|
||||||
// The MIT License (MIT)
|
|
||||||
// Copyright (c) 2018 Oleg Geier
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
// this software and associated documentation files (the "Software"), to deal in
|
|
||||||
// the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
// of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#import "AppHook.h"
|
#import "AppHook.h"
|
||||||
|
|
||||||
int main(int argc, const char * argv[]) {
|
int main(int argc, const char * argv[]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user