mirror of
https://github.com/ViennaRSS/vienna-rss.git
synced 2026-04-07 19:27:39 +00:00
Move instance variable declarations from interface to implementation
Clang allows instance variable declaration in the class implementation. Apple has recommended this since at least 2013: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjectiveC/Chapters/ocDefiningClasses.html.
This commit is contained in:
@@ -71,17 +71,14 @@
|
||||
* June 26, 2022
|
||||
Changes by Eitot:
|
||||
• Removed obsolete APIs.
|
||||
* Mai 13, 2023
|
||||
Changes by Eitot:
|
||||
• Moved ivar declarations from interface to implementation
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface DSClickableURLTextField : NSTextField {
|
||||
NSTextStorage *URLStorage;
|
||||
NSLayoutManager *URLManager;
|
||||
NSTextContainer *URLContainer;
|
||||
NSURL *clickedURL;
|
||||
BOOL canCopyURLs;
|
||||
}
|
||||
@interface DSClickableURLTextField : NSTextField
|
||||
|
||||
@property (nonatomic) BOOL canCopyURLs;
|
||||
|
||||
|
||||
@@ -73,7 +73,13 @@
|
||||
#import "DSClickableURLTextField.h"
|
||||
|
||||
|
||||
@implementation DSClickableURLTextField
|
||||
@implementation DSClickableURLTextField {
|
||||
NSTextStorage *URLStorage;
|
||||
NSLayoutManager *URLManager;
|
||||
NSTextContainer *URLContainer;
|
||||
NSURL *clickedURL;
|
||||
BOOL canCopyURLs;
|
||||
}
|
||||
|
||||
/* Set the text field to be non-editable and
|
||||
non-selectable. */
|
||||
|
||||
@@ -3210,6 +3210,7 @@
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_INTERFACE_IVARS = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
@@ -3269,6 +3270,7 @@
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_INTERFACE_IVARS = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
|
||||
@@ -20,13 +20,7 @@
|
||||
|
||||
@import Cocoa;
|
||||
|
||||
@interface NewGroupFolder : NSWindowController {
|
||||
IBOutlet NSWindow * newGroupFolderWindow;
|
||||
IBOutlet NSTextField * folderName;
|
||||
IBOutlet NSButton * saveButton;
|
||||
IBOutlet NSButton * cancelButton;
|
||||
NSInteger parentId;
|
||||
}
|
||||
@interface NewGroupFolder : NSWindowController
|
||||
|
||||
@property NSArray * topObjects;
|
||||
|
||||
|
||||
@@ -30,7 +30,13 @@
|
||||
|
||||
@end
|
||||
|
||||
@implementation NewGroupFolder
|
||||
@implementation NewGroupFolder {
|
||||
IBOutlet NSWindow *newGroupFolderWindow;
|
||||
IBOutlet NSTextField *folderName;
|
||||
IBOutlet NSButton *saveButton;
|
||||
IBOutlet NSButton *cancelButton;
|
||||
NSInteger parentId;
|
||||
}
|
||||
|
||||
/* newGroupFolder
|
||||
* Display the sheet to create a new group folder.
|
||||
|
||||
@@ -21,27 +21,8 @@
|
||||
@import Cocoa;
|
||||
|
||||
@class Database;
|
||||
@class SubscriptionModel;
|
||||
|
||||
@interface NewSubscription : NSWindowController {
|
||||
IBOutlet NSTextField * linkTitle;
|
||||
IBOutlet NSTextField * feedURL;
|
||||
IBOutlet NSTextField * editFeedURL;
|
||||
IBOutlet NSPopUpButton * feedSource;
|
||||
IBOutlet NSButton * subscribeButton;
|
||||
IBOutlet NSButton * saveButton;
|
||||
IBOutlet NSButton * editCancelButton;
|
||||
IBOutlet NSButton * subscribeCancelButton;
|
||||
IBOutlet NSWindow * newRSSFeedWindow;
|
||||
IBOutlet NSWindow * editRSSFeedWindow;
|
||||
IBOutlet NSButton * siteHomePageButton;
|
||||
BOOL googleOptionButton;
|
||||
NSDictionary * sourcesDict;
|
||||
Database * db;
|
||||
NSInteger editFolderId;
|
||||
SubscriptionModel *subscriptionModel;
|
||||
|
||||
}
|
||||
@interface NewSubscription : NSWindowController
|
||||
|
||||
@property BOOL googleOptionButton;
|
||||
@property NSArray * topObjects;
|
||||
|
||||
@@ -35,7 +35,24 @@
|
||||
|
||||
@end
|
||||
|
||||
@implementation NewSubscription
|
||||
@implementation NewSubscription {
|
||||
IBOutlet NSTextField *linkTitle;
|
||||
IBOutlet NSTextField *feedURL;
|
||||
IBOutlet NSTextField *editFeedURL;
|
||||
IBOutlet NSPopUpButton *feedSource;
|
||||
IBOutlet NSButton *subscribeButton;
|
||||
IBOutlet NSButton *saveButton;
|
||||
IBOutlet NSButton *editCancelButton;
|
||||
IBOutlet NSButton *subscribeCancelButton;
|
||||
IBOutlet NSWindow *newRSSFeedWindow;
|
||||
IBOutlet NSWindow *editRSSFeedWindow;
|
||||
IBOutlet NSButton *siteHomePageButton;
|
||||
BOOL googleOptionButton;
|
||||
NSDictionary *sourcesDict;
|
||||
Database *db;
|
||||
NSInteger editFolderId;
|
||||
SubscriptionModel *subscriptionModel;
|
||||
}
|
||||
|
||||
/* initWithDatabase
|
||||
* Just init the RSS feed class.
|
||||
|
||||
@@ -21,11 +21,6 @@
|
||||
@import Cocoa;
|
||||
|
||||
@interface SearchPanel : NSWindowController
|
||||
{
|
||||
IBOutlet NSWindow * searchPanelWindow;
|
||||
IBOutlet NSSearchField * searchField;
|
||||
IBOutlet NSTextField * searchLabel;
|
||||
}
|
||||
|
||||
@property NSArray * topObjects;
|
||||
|
||||
|
||||
@@ -23,7 +23,11 @@
|
||||
#import "Vienna-Swift.h"
|
||||
#import "SearchMethod.h"
|
||||
|
||||
@implementation SearchPanel
|
||||
@implementation SearchPanel {
|
||||
IBOutlet NSWindow *searchPanelWindow;
|
||||
IBOutlet NSSearchField *searchField;
|
||||
IBOutlet NSTextField *searchLabel;
|
||||
}
|
||||
|
||||
/* runSearchPanel
|
||||
* Show the search panel.
|
||||
|
||||
@@ -25,43 +25,20 @@
|
||||
#define APP ((ViennaApp *)NSApp)
|
||||
|
||||
@class FoldersTree;
|
||||
@class SmartFolder;
|
||||
@class NewSubscription;
|
||||
@class NewGroupFolder;
|
||||
@class SearchPanel;
|
||||
@class DisclosureView;
|
||||
@class PluginManager;
|
||||
@class SearchMethod;
|
||||
@class Database;
|
||||
@class ArticleController;
|
||||
@class DownloadWindow;
|
||||
@class Article;
|
||||
@class UnifiedDisplayView;
|
||||
@class ArticleListView;
|
||||
@protocol Browser;
|
||||
|
||||
@interface AppController : NSObject <NSApplicationDelegate>
|
||||
{
|
||||
IBOutlet NSMenuItem * closeTabItem;
|
||||
IBOutlet NSMenuItem * closeAllTabsItem;
|
||||
IBOutlet NSMenuItem * closeWindowItem;
|
||||
IBOutlet NSMenuItem * sortByMenu;
|
||||
IBOutlet NSMenuItem * columnsMenu;
|
||||
|
||||
DownloadWindow * downloadWindow;
|
||||
SmartFolder * smartFolder;
|
||||
NewGroupFolder * groupFolder;
|
||||
SearchPanel * searchPanel;
|
||||
|
||||
Database * db;
|
||||
NSMutableDictionary * scriptPathMappings;
|
||||
NSStatusItem * appStatusItem;
|
||||
NSInteger lastCountOfUnread;
|
||||
NSMenuItem * scriptsMenuItem;
|
||||
BOOL didCompleteInitialisation;
|
||||
NSString * searchString;
|
||||
|
||||
NewSubscription * _rssFeed;
|
||||
@interface AppController : NSObject <NSApplicationDelegate> {
|
||||
#pragma clang diagnostic ignored "-Wobjc-interface-ivars"
|
||||
Database *db;
|
||||
}
|
||||
|
||||
@property (nonatomic) IBOutlet SPUStandardUpdaterController *sparkleController;
|
||||
|
||||
@@ -107,7 +107,28 @@ static void *VNAAppControllerObserverContext = &VNAAppControllerObserverContext;
|
||||
|
||||
@end
|
||||
|
||||
@implementation AppController
|
||||
@implementation AppController {
|
||||
IBOutlet NSMenuItem *closeTabItem;
|
||||
IBOutlet NSMenuItem *closeAllTabsItem;
|
||||
IBOutlet NSMenuItem *closeWindowItem;
|
||||
IBOutlet NSMenuItem *sortByMenu;
|
||||
IBOutlet NSMenuItem *columnsMenu;
|
||||
|
||||
DownloadWindow *downloadWindow;
|
||||
SmartFolder *smartFolder;
|
||||
NewGroupFolder *groupFolder;
|
||||
SearchPanel *searchPanel;
|
||||
|
||||
// Database * db;
|
||||
NSMutableDictionary *scriptPathMappings;
|
||||
NSStatusItem *appStatusItem;
|
||||
NSInteger lastCountOfUnread;
|
||||
NSMenuItem *scriptsMenuItem;
|
||||
BOOL didCompleteInitialisation;
|
||||
NSString *searchString;
|
||||
|
||||
NewSubscription *_rssFeed;
|
||||
}
|
||||
|
||||
@synthesize rssFeed = _rssFeed;
|
||||
|
||||
|
||||
@@ -23,10 +23,6 @@
|
||||
@class Article;
|
||||
|
||||
@interface ArticleReference : NSObject
|
||||
{
|
||||
NSString * guid;
|
||||
NSInteger folderId;
|
||||
}
|
||||
|
||||
// Public functions
|
||||
+(ArticleReference *)makeReference:(Article *)anArticle;
|
||||
|
||||
@@ -22,7 +22,10 @@
|
||||
|
||||
#import "Article.h"
|
||||
|
||||
@implementation ArticleReference
|
||||
@implementation ArticleReference {
|
||||
NSString *guid;
|
||||
NSInteger folderId;
|
||||
}
|
||||
|
||||
/* initWithReference
|
||||
*/
|
||||
|
||||
@@ -20,15 +20,7 @@
|
||||
|
||||
@import Cocoa;
|
||||
|
||||
@class ExtendedTableView;
|
||||
|
||||
@interface DownloadWindow : NSWindowController <NSWindowDelegate,NSMenuDelegate,NSTableViewDelegate,NSTableViewDataSource> {
|
||||
IBOutlet NSWindow * downloadWindow;
|
||||
IBOutlet ExtendedTableView * table;
|
||||
IBOutlet NSButton * clearButton;
|
||||
NSInteger lastCount;
|
||||
NSMenu * openWithMenu;
|
||||
}
|
||||
@interface DownloadWindow : NSWindowController <NSWindowDelegate, NSMenuDelegate, NSTableViewDelegate, NSTableViewDataSource>
|
||||
|
||||
// Public functions
|
||||
-(IBAction)clearList:(id)sender;
|
||||
|
||||
@@ -29,7 +29,13 @@
|
||||
#import "TableViewExtensions.h"
|
||||
#import "NSWorkspace+OpenWithMenu.h"
|
||||
|
||||
@implementation DownloadWindow
|
||||
@implementation DownloadWindow {
|
||||
IBOutlet NSWindow *downloadWindow;
|
||||
IBOutlet ExtendedTableView *table;
|
||||
IBOutlet NSButton *clearButton;
|
||||
NSInteger lastCount;
|
||||
NSMenu *openWithMenu;
|
||||
}
|
||||
|
||||
/* init
|
||||
* Just init the download window.
|
||||
|
||||
@@ -24,20 +24,7 @@
|
||||
|
||||
@class TreeNode;
|
||||
|
||||
@interface ImageAndTextCell : VNAVerticallyCenteredTextFieldCell {
|
||||
@private
|
||||
NSImage * image;
|
||||
NSImage * auxiliaryImage;
|
||||
NSColor * countBackgroundColour;
|
||||
NSColor * countBackgroundColourGradientEnd;
|
||||
NSShadow * countLabelShadow;
|
||||
NSInteger offset;
|
||||
NSInteger count;
|
||||
BOOL hasCount;
|
||||
BOOL inProgress;
|
||||
|
||||
TreeNode * item;
|
||||
}
|
||||
@interface ImageAndTextCell : VNAVerticallyCenteredTextFieldCell
|
||||
|
||||
// Accessor functions
|
||||
-(void)setCount:(NSInteger)newCount;
|
||||
|
||||
@@ -25,7 +25,19 @@
|
||||
/* All of this stuff taken from public stuff published
|
||||
* by Apple.
|
||||
*/
|
||||
@implementation ImageAndTextCell
|
||||
@implementation ImageAndTextCell {
|
||||
NSImage *image;
|
||||
NSImage *auxiliaryImage;
|
||||
NSColor *countBackgroundColour;
|
||||
NSColor *countBackgroundColourGradientEnd;
|
||||
NSShadow *countLabelShadow;
|
||||
NSInteger offset;
|
||||
NSInteger count;
|
||||
BOOL hasCount;
|
||||
BOOL inProgress;
|
||||
|
||||
TreeNode *item;
|
||||
}
|
||||
|
||||
@synthesize image = image;
|
||||
|
||||
|
||||
@@ -20,19 +20,9 @@
|
||||
|
||||
@import Foundation;
|
||||
|
||||
@class Database;
|
||||
@class FeedCredentials;
|
||||
@class Folder;
|
||||
|
||||
@interface RefreshManager : NSObject <NSURLSessionTaskDelegate> {
|
||||
NSUInteger countOfNewArticles;
|
||||
NSMutableArray * authQueue;
|
||||
FeedCredentials * credentialsController;
|
||||
BOOL hasStarted;
|
||||
NSString * statusMessageDuringRefresh;
|
||||
NSOperationQueue *networkQueue;
|
||||
dispatch_queue_t _queue;
|
||||
}
|
||||
@interface RefreshManager : NSObject <NSURLSessionTaskDelegate>
|
||||
|
||||
@property (class, readonly, nonatomic) RefreshManager *sharedManager;
|
||||
|
||||
|
||||
@@ -69,7 +69,15 @@ typedef NS_ENUM (NSInteger, Redirect301Status) {
|
||||
|
||||
@end
|
||||
|
||||
@implementation RefreshManager
|
||||
@implementation RefreshManager {
|
||||
NSUInteger countOfNewArticles;
|
||||
NSMutableArray *authQueue;
|
||||
FeedCredentials *credentialsController;
|
||||
BOOL hasStarted;
|
||||
NSString *statusMessageDuringRefresh;
|
||||
NSOperationQueue *networkQueue;
|
||||
dispatch_queue_t _queue;
|
||||
}
|
||||
|
||||
+(void)initialize
|
||||
{
|
||||
|
||||
@@ -22,9 +22,7 @@
|
||||
|
||||
@class InfoPanelController;
|
||||
|
||||
@interface InfoPanelManager : NSObject {
|
||||
NSMutableDictionary * controllerList;
|
||||
}
|
||||
@interface InfoPanelManager : NSObject
|
||||
|
||||
@property (class, readonly, nonatomic) InfoPanelManager *infoWindowManager;
|
||||
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
#import "Database.h"
|
||||
#import "InfoPanelController.h"
|
||||
|
||||
@implementation InfoPanelManager
|
||||
@implementation InfoPanelManager {
|
||||
NSMutableDictionary *controllerList;
|
||||
}
|
||||
|
||||
/* infoWindowManager
|
||||
* Returns the shared instance of the InfoWindowManager
|
||||
|
||||
@@ -8,18 +8,10 @@
|
||||
@import Cocoa;
|
||||
@import WebKit;
|
||||
|
||||
@class AppController;
|
||||
@class ArticleConverter;
|
||||
@protocol ArticleContentView;
|
||||
|
||||
@interface ArticleCellView : NSTableCellView <WKNavigationDelegate>
|
||||
{
|
||||
AppController * controller;
|
||||
BOOL inProgress;
|
||||
NSInteger folderId;
|
||||
NSUInteger articleRow;
|
||||
NSTableView *__weak _listView;
|
||||
}
|
||||
|
||||
@property (readonly) NSObject<ArticleContentView> *articleView;
|
||||
@property (readonly) ArticleConverter * articleConverter;
|
||||
|
||||
@@ -16,7 +16,13 @@
|
||||
#define PROGRESS_INDICATOR_LEFT_MARGIN 8
|
||||
#define PROGRESS_INDICATOR_DIMENSION_REGULAR 24
|
||||
|
||||
@implementation ArticleCellView
|
||||
@implementation ArticleCellView {
|
||||
AppController *controller;
|
||||
BOOL inProgress;
|
||||
NSInteger folderId;
|
||||
NSUInteger articleRow;
|
||||
NSTableView *__weak _listView;
|
||||
}
|
||||
|
||||
@synthesize listView = _listView;
|
||||
@synthesize articleView;
|
||||
|
||||
@@ -38,22 +38,6 @@
|
||||
* controller.
|
||||
*/
|
||||
@interface ArticleController : NSViewController
|
||||
{
|
||||
NSView<ArticleBaseView, BaseView> * mainArticleView;
|
||||
NSArray * currentArrayOfArticles;
|
||||
NSArray * folderArrayOfArticles;
|
||||
NSInteger currentFolderId;
|
||||
NSDictionary * articleSortSpecifiers;
|
||||
NSString * sortColumnIdentifier;
|
||||
BackTrackArray * backtrackArray;
|
||||
BOOL isBacktracking;
|
||||
BOOL shouldPreserveSelectedArticle;
|
||||
Article * articleToPreserve;
|
||||
NSString * guidOfArticleToSelect;
|
||||
BOOL firstUnreadArticleRequired;
|
||||
dispatch_queue_t queue;
|
||||
BOOL requireSelectArticleAfterReload;
|
||||
}
|
||||
|
||||
@property (nonatomic) FoldersTree * foldersTree;
|
||||
@property (nonatomic) ArticleListView *articleListView;
|
||||
|
||||
@@ -50,7 +50,23 @@ static void *VNAArticleControllerObserverContext = &VNAArticleControllerObserver
|
||||
|
||||
@end
|
||||
|
||||
@implementation ArticleController
|
||||
@implementation ArticleController {
|
||||
NSView<ArticleBaseView, BaseView> *mainArticleView;
|
||||
NSArray *currentArrayOfArticles;
|
||||
NSArray *folderArrayOfArticles;
|
||||
NSInteger currentFolderId;
|
||||
NSDictionary *articleSortSpecifiers;
|
||||
NSString *sortColumnIdentifier;
|
||||
BackTrackArray *backtrackArray;
|
||||
BOOL isBacktracking;
|
||||
BOOL shouldPreserveSelectedArticle;
|
||||
Article *articleToPreserve;
|
||||
NSString *guidOfArticleToSelect;
|
||||
BOOL firstUnreadArticleRequired;
|
||||
dispatch_queue_t queue;
|
||||
BOOL requireSelectArticleAfterReload;
|
||||
}
|
||||
|
||||
@synthesize mainArticleView, currentArrayOfArticles, folderArrayOfArticles, articleSortSpecifiers, backtrackArray;
|
||||
|
||||
/* init
|
||||
|
||||
@@ -25,40 +25,7 @@
|
||||
#import "ArticleViewDelegate.h"
|
||||
#import "MessageListView.h"
|
||||
|
||||
@class AppController;
|
||||
@class ArticleView;
|
||||
@protocol ArticleContentView;
|
||||
@protocol Tab;
|
||||
|
||||
@interface ArticleListView : NSView<BaseView, ArticleBaseView, ArticleViewDelegate, MessageListViewDelegate, NSTableViewDataSource, NSSplitViewDelegate>
|
||||
{
|
||||
IBOutlet MessageListView * articleList;
|
||||
NSObject<ArticleContentView, Tab> *articleText;
|
||||
IBOutlet NSSplitView * splitView2;
|
||||
|
||||
NSInteger tableLayout;
|
||||
BOOL isAppInitialising;
|
||||
BOOL isChangingOrientation;
|
||||
BOOL isInTableInit;
|
||||
BOOL blockSelectionHandler;
|
||||
|
||||
NSTimer * markReadTimer;
|
||||
NSFont * articleListFont;
|
||||
NSFont * articleListUnreadFont;
|
||||
NSMutableDictionary * reportCellDict;
|
||||
NSMutableDictionary * unreadReportCellDict;
|
||||
NSMutableDictionary * selectionDict;
|
||||
NSMutableDictionary * topLineDict;
|
||||
NSMutableDictionary * linkLineDict;
|
||||
NSMutableDictionary * middleLineDict;
|
||||
NSMutableDictionary * bottomLineDict;
|
||||
NSMutableDictionary * unreadTopLineDict;
|
||||
NSMutableDictionary * unreadTopLineSelectionDict;
|
||||
|
||||
NSURL * currentURL;
|
||||
BOOL isLoadingHTMLArticle;
|
||||
NSProgressIndicator * progressIndicator;
|
||||
}
|
||||
@interface ArticleListView : NSView <BaseView, ArticleBaseView, ArticleViewDelegate, MessageListViewDelegate, NSTableViewDataSource, NSSplitViewDelegate>
|
||||
|
||||
// Public functions
|
||||
-(void)updateVisibleColumns;
|
||||
|
||||
@@ -70,7 +70,34 @@ static void *VNAArticleListViewObserverContext = &VNAArticleListViewObserverCont
|
||||
|
||||
@end
|
||||
|
||||
@implementation ArticleListView
|
||||
@implementation ArticleListView {
|
||||
IBOutlet MessageListView *articleList;
|
||||
NSObject<ArticleContentView, Tab> *articleText;
|
||||
IBOutlet NSSplitView *splitView2;
|
||||
|
||||
NSInteger tableLayout;
|
||||
BOOL isAppInitialising;
|
||||
BOOL isChangingOrientation;
|
||||
BOOL isInTableInit;
|
||||
BOOL blockSelectionHandler;
|
||||
|
||||
NSTimer *markReadTimer;
|
||||
NSFont *articleListFont;
|
||||
NSFont *articleListUnreadFont;
|
||||
NSMutableDictionary *reportCellDict;
|
||||
NSMutableDictionary *unreadReportCellDict;
|
||||
NSMutableDictionary *selectionDict;
|
||||
NSMutableDictionary *topLineDict;
|
||||
NSMutableDictionary *linkLineDict;
|
||||
NSMutableDictionary *middleLineDict;
|
||||
NSMutableDictionary *bottomLineDict;
|
||||
NSMutableDictionary *unreadTopLineDict;
|
||||
NSMutableDictionary *unreadTopLineSelectionDict;
|
||||
|
||||
NSURL *currentURL;
|
||||
BOOL isLoadingHTMLArticle;
|
||||
NSProgressIndicator *progressIndicator;
|
||||
}
|
||||
|
||||
/* initWithFrame
|
||||
* Initialise our view.
|
||||
|
||||
@@ -20,11 +20,7 @@
|
||||
|
||||
@import Foundation;
|
||||
|
||||
@interface BackTrackArray : NSObject {
|
||||
NSMutableArray * array;
|
||||
NSUInteger maxItems;
|
||||
NSInteger queueIndex;
|
||||
}
|
||||
@interface BackTrackArray : NSObject
|
||||
|
||||
// Accessor functions
|
||||
-(instancetype)initWithMaximum:(NSUInteger)theMax /*NS_DESIGNATED_INITIALIZER*/;
|
||||
|
||||
@@ -21,7 +21,11 @@
|
||||
#import "BackTrackArray.h"
|
||||
#import "ArticleRef.h"
|
||||
|
||||
@implementation BackTrackArray
|
||||
@implementation BackTrackArray {
|
||||
NSMutableArray *array;
|
||||
NSUInteger maxItems;
|
||||
NSInteger queueIndex;
|
||||
}
|
||||
|
||||
/* initWithMaximum
|
||||
* Initialises a new BackTrackArray with the specified maximum number of
|
||||
|
||||
@@ -20,16 +20,7 @@
|
||||
|
||||
@import Cocoa;
|
||||
|
||||
@class DSClickableURLTextField;
|
||||
|
||||
@interface EnclosureView : NSView
|
||||
{
|
||||
IBOutlet NSImageView * fileImage;
|
||||
IBOutlet NSTextField * filenameLabel;
|
||||
IBOutlet DSClickableURLTextField * filenameField;
|
||||
IBOutlet NSButton * downloadButton;
|
||||
NSString * enclosureURLString;
|
||||
}
|
||||
|
||||
// Public functions
|
||||
-(IBAction)downloadFile:(id)sender;
|
||||
|
||||
@@ -34,7 +34,13 @@
|
||||
|
||||
@end
|
||||
|
||||
@implementation EnclosureView
|
||||
@implementation EnclosureView {
|
||||
IBOutlet NSImageView *fileImage;
|
||||
IBOutlet NSTextField *filenameLabel;
|
||||
IBOutlet DSClickableURLTextField *filenameField;
|
||||
IBOutlet NSButton *downloadButton;
|
||||
NSString *enclosureURLString;
|
||||
}
|
||||
|
||||
/* initWithFrame
|
||||
* Initialise the standard enclosure view.
|
||||
|
||||
@@ -9,8 +9,11 @@
|
||||
@import Cocoa;
|
||||
|
||||
@interface FoldersFilterableDataSource : NSObject <NSOutlineViewDataSource> {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wobjc-interface-ivars"
|
||||
@protected
|
||||
__unsafe_unretained id <NSOutlineViewDataSource> _dataSource;
|
||||
__unsafe_unretained id <NSOutlineViewDataSource> _dataSource;
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
- (instancetype)initWithDataSource:(id<NSOutlineViewDataSource>)dataSource /*NS_DESIGNATED_INITIALIZER*/;
|
||||
|
||||
@@ -26,15 +26,7 @@
|
||||
* This class is used to draw a progress indicator next to the text for a text cell. If you set
|
||||
* the inProgress flag to true then it will draw the progress indicator.
|
||||
*/
|
||||
@interface ProgressTextCell : VNAVerticallyCenteredTextFieldCell {
|
||||
@private
|
||||
|
||||
BOOL inProgress;
|
||||
NSInteger progressRow;
|
||||
NSInteger currentRow;
|
||||
|
||||
NSProgressIndicator * progressIndicator;
|
||||
}
|
||||
@interface ProgressTextCell : VNAVerticallyCenteredTextFieldCell
|
||||
|
||||
// Accessor functions
|
||||
-(void)setInProgress:(BOOL)newInProgress forRow:(NSInteger)row;
|
||||
|
||||
@@ -31,7 +31,13 @@
|
||||
* handle the indicator for us like we do in our ImageAndTextCell class
|
||||
* used for the folder/feed view.
|
||||
*/
|
||||
@implementation ProgressTextCell
|
||||
@implementation ProgressTextCell {
|
||||
BOOL inProgress;
|
||||
NSInteger progressRow;
|
||||
NSInteger currentRow;
|
||||
|
||||
NSProgressIndicator *progressIndicator;
|
||||
}
|
||||
|
||||
/* init
|
||||
* Initialise a default instance of our cell.
|
||||
|
||||
@@ -24,14 +24,7 @@
|
||||
|
||||
#define PROGRESS_INDICATOR_DIMENSION 16
|
||||
|
||||
|
||||
@interface TreeNode : NSObject {
|
||||
TreeNode * parentNode;
|
||||
NSMutableArray * children;
|
||||
Folder * folder;
|
||||
NSInteger nodeId;
|
||||
BOOL canHaveChildren;
|
||||
}
|
||||
@interface TreeNode : NSObject
|
||||
|
||||
// Accessor functions
|
||||
-(instancetype)init:(TreeNode *)parentNode atIndex:(NSInteger)insertIndex folder:(Folder *)folder canHaveChildren:(BOOL)childflag /*NS_DESIGNATED_INITIALIZER*/;
|
||||
|
||||
@@ -24,7 +24,13 @@
|
||||
#import "Folder.h"
|
||||
#import "Vienna-Swift.h"
|
||||
|
||||
@implementation TreeNode
|
||||
@implementation TreeNode {
|
||||
TreeNode *parentNode;
|
||||
NSMutableArray *children;
|
||||
Folder *folder;
|
||||
NSInteger nodeId;
|
||||
BOOL canHaveChildren;
|
||||
}
|
||||
|
||||
/* init
|
||||
* Initialises a treenode.
|
||||
|
||||
@@ -23,17 +23,8 @@
|
||||
#import "MessageListView.h"
|
||||
|
||||
@class AppController;
|
||||
@class ExtendedTableView;
|
||||
|
||||
@interface UnifiedDisplayView : NSView <BaseView, ArticleBaseView, NSMenuItemValidation, MessageListViewDelegate, NSTableViewDataSource>
|
||||
{
|
||||
IBOutlet ExtendedTableView *articleList;
|
||||
|
||||
NSTimer * markReadTimer;
|
||||
|
||||
NSMutableArray * rowHeightArray;
|
||||
NSProgressIndicator * progressIndicator;
|
||||
}
|
||||
|
||||
@property (weak, nonatomic) AppController *controller;
|
||||
|
||||
|
||||
@@ -55,7 +55,14 @@ static void *VNAUnifiedDisplayViewObserverContext = &VNAUnifiedDisplayViewObserv
|
||||
|
||||
@end
|
||||
|
||||
@implementation UnifiedDisplayView
|
||||
@implementation UnifiedDisplayView {
|
||||
IBOutlet ExtendedTableView *articleList;
|
||||
|
||||
NSTimer *markReadTimer;
|
||||
|
||||
NSMutableArray *rowHeightArray;
|
||||
NSProgressIndicator *progressIndicator;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Init/Dealloc
|
||||
|
||||
@@ -74,17 +74,7 @@ typedef NS_ENUM(NSInteger, ArticleStatus) {
|
||||
ArticleStatusUpdated
|
||||
};
|
||||
|
||||
@interface Article : NSObject {
|
||||
NSMutableDictionary * articleData;
|
||||
NSMutableArray * commentsArray;
|
||||
BOOL readFlag;
|
||||
BOOL revisedFlag;
|
||||
BOOL markedFlag;
|
||||
BOOL deletedFlag;
|
||||
BOOL enclosureDownloadedFlag;
|
||||
BOOL hasEnclosureFlag;
|
||||
NSInteger status;
|
||||
}
|
||||
@interface Article : NSObject
|
||||
|
||||
// Accessor functions
|
||||
-(instancetype _Nonnull)initWithGuid:(NSString * _Nonnull)theGuid /*NS_DESIGNATED_INITIALIZER*/;
|
||||
|
||||
@@ -46,7 +46,17 @@ NSString * const MA_Field_Enclosure = @"Enclosure";
|
||||
NSString * const MA_Field_EnclosureDownloaded = @"EnclosureDownloaded";
|
||||
NSString * const MA_Field_HasEnclosure = @"HasEnclosure";
|
||||
|
||||
@implementation Article
|
||||
@implementation Article {
|
||||
NSMutableDictionary *articleData;
|
||||
NSMutableArray *commentsArray;
|
||||
BOOL readFlag;
|
||||
BOOL revisedFlag;
|
||||
BOOL markedFlag;
|
||||
BOOL deletedFlag;
|
||||
BOOL enclosureDownloadedFlag;
|
||||
BOOL hasEnclosureFlag;
|
||||
NSInteger status;
|
||||
}
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
|
||||
@@ -68,12 +68,7 @@ typedef NS_OPTIONS(NSUInteger, VNAFolderFlag) {
|
||||
VNAFolderFlagBuggySync = 1 << 7
|
||||
};
|
||||
|
||||
@interface Folder : NSObject <NSCacheDelegate> {
|
||||
NSInteger unreadCount;
|
||||
NSInteger childUnreadCount;
|
||||
VNAFolderFlag nonPersistedFlags;
|
||||
VNAFolderFlag flags;
|
||||
}
|
||||
@interface Folder : NSObject <NSCacheDelegate>
|
||||
|
||||
// Initialisation functions
|
||||
-(instancetype)initWithId:(NSInteger)itemId parentId:(NSInteger)parentId name:(NSString *)name type:(VNAFolderType)type /*NS_DESIGNATED_INITIALIZER*/;
|
||||
|
||||
@@ -45,8 +45,12 @@
|
||||
// Static pointers
|
||||
static NSArray * iconArray = nil;
|
||||
|
||||
|
||||
@implementation Folder
|
||||
@implementation Folder {
|
||||
NSInteger unreadCount;
|
||||
NSInteger childUnreadCount;
|
||||
VNAFolderFlag nonPersistedFlags;
|
||||
VNAFolderFlag flags;
|
||||
}
|
||||
|
||||
/* initWithId
|
||||
* Initialise a new folder object instance.
|
||||
|
||||
@@ -8,11 +8,7 @@
|
||||
|
||||
@import Cocoa;
|
||||
|
||||
@interface FolderImageCache : NSObject {
|
||||
NSString * imagesCacheFolder;
|
||||
NSMutableDictionary * folderImagesArray;
|
||||
BOOL initializedFolderImagesArray;
|
||||
}
|
||||
@interface FolderImageCache : NSObject
|
||||
|
||||
@property (class, readonly, nonatomic) FolderImageCache *defaultCache;
|
||||
|
||||
|
||||
@@ -20,8 +20,11 @@
|
||||
|
||||
static FolderImageCache * _folderImageCache = nil;
|
||||
|
||||
@implementation FolderImageCache
|
||||
|
||||
@implementation FolderImageCache {
|
||||
NSString *imagesCacheFolder;
|
||||
NSMutableDictionary *folderImagesArray;
|
||||
BOOL initializedFolderImagesArray;
|
||||
}
|
||||
|
||||
/* defaultCache
|
||||
* Returns a pointer to the default cache. There is just one default cache
|
||||
|
||||
@@ -22,9 +22,7 @@
|
||||
|
||||
@class SearchMethod;
|
||||
|
||||
@interface PluginManager : NSObject <NSMenuItemValidation, NSToolbarItemValidation> {
|
||||
NSMutableDictionary * allPlugins;
|
||||
}
|
||||
@interface PluginManager : NSObject <NSMenuItemValidation, NSToolbarItemValidation>
|
||||
|
||||
-(void)resetPlugins;
|
||||
@property (class, readonly, nonatomic) NSURL *plugInsDirectoryURL;
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
|
||||
static NSString * const VNAPlugInsDirectoryName = @"Plugins";
|
||||
|
||||
@implementation PluginManager
|
||||
@implementation PluginManager {
|
||||
NSMutableDictionary *allPlugins;
|
||||
}
|
||||
|
||||
/* init
|
||||
* Initialises the plugin manager.
|
||||
|
||||
@@ -20,10 +20,7 @@
|
||||
|
||||
@import Cocoa;
|
||||
|
||||
@interface AdvancedPreferencesViewController : NSViewController {
|
||||
IBOutlet NSButton * useJavaScriptButton;
|
||||
IBOutlet NSPopUpButton * concurrentDownloads;
|
||||
}
|
||||
@interface AdvancedPreferencesViewController : NSViewController
|
||||
|
||||
// Action functions
|
||||
-(IBAction)changeUseJavaScript:(id)sender;
|
||||
|
||||
@@ -27,7 +27,10 @@
|
||||
|
||||
@end
|
||||
|
||||
@implementation AdvancedPreferencesViewController
|
||||
@implementation AdvancedPreferencesViewController {
|
||||
IBOutlet NSButton *useJavaScriptButton;
|
||||
IBOutlet NSPopUpButton *concurrentDownloads;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
@@ -20,13 +20,7 @@
|
||||
|
||||
@import Cocoa;
|
||||
|
||||
@interface AppearancePreferencesViewController : NSViewController {
|
||||
IBOutlet NSTextField * articleFontSample;
|
||||
IBOutlet NSButton * articleFontSelectButton;
|
||||
IBOutlet NSComboBox * minimumFontSizes;
|
||||
IBOutlet NSButton * enableMinimumFontSize;
|
||||
IBOutlet NSButton * showFolderImagesButton;
|
||||
}
|
||||
@interface AppearancePreferencesViewController : NSViewController
|
||||
|
||||
// Action functions
|
||||
-(IBAction)selectArticleFont:(id)sender;
|
||||
|
||||
@@ -35,7 +35,13 @@ static NSInteger const availableMinimumFontSizes[] = { 9, 10, 11, 12, 14, 18, 24
|
||||
|
||||
@end
|
||||
|
||||
@implementation AppearancePreferencesViewController
|
||||
@implementation AppearancePreferencesViewController {
|
||||
IBOutlet NSTextField *articleFontSample;
|
||||
IBOutlet NSButton *articleFontSelectButton;
|
||||
IBOutlet NSComboBox *minimumFontSizes;
|
||||
IBOutlet NSButton *enableMinimumFontSize;
|
||||
IBOutlet NSButton *showFolderImagesButton;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
NSNotificationCenter * nc = [NSNotificationCenter defaultCenter];
|
||||
|
||||
@@ -20,21 +20,7 @@
|
||||
|
||||
@import Cocoa;
|
||||
|
||||
@interface GeneralPreferencesViewController : NSViewController <NSOpenSavePanelDelegate> {
|
||||
IBOutlet NSPopUpButton * checkFrequency;
|
||||
IBOutlet NSPopUpButton * linksHandler;
|
||||
IBOutlet NSPopUpButton * expireDuration;
|
||||
IBOutlet NSButton * checkOnStartUp;
|
||||
IBOutlet NSButton * openLinksInBackground;
|
||||
IBOutlet NSButton * openLinksInExternalBrowser;
|
||||
IBOutlet NSButton * showAppInMenuBar;
|
||||
IBOutlet NSPopUpButton * downloadFolder;
|
||||
IBOutlet NSButtonCell * newArticlesNotificationBounceButton;
|
||||
IBOutlet NSButtonCell * markReadAfterNext;
|
||||
IBOutlet NSButtonCell * markReadAfterDelay;
|
||||
IBOutlet NSButton * markUpdatedAsNew;
|
||||
NSMutableDictionary * appToPathMap;
|
||||
}
|
||||
@interface GeneralPreferencesViewController : NSViewController <NSOpenSavePanelDelegate>
|
||||
|
||||
// Action functions
|
||||
-(IBAction)changeCheckFrequency:(id)sender;
|
||||
|
||||
@@ -41,7 +41,21 @@
|
||||
|
||||
@end
|
||||
|
||||
@implementation GeneralPreferencesViewController
|
||||
@implementation GeneralPreferencesViewController {
|
||||
IBOutlet NSPopUpButton *checkFrequency;
|
||||
IBOutlet NSPopUpButton *linksHandler;
|
||||
IBOutlet NSPopUpButton *expireDuration;
|
||||
IBOutlet NSButton *checkOnStartUp;
|
||||
IBOutlet NSButton *openLinksInBackground;
|
||||
IBOutlet NSButton *openLinksInExternalBrowser;
|
||||
IBOutlet NSButton *showAppInMenuBar;
|
||||
IBOutlet NSPopUpButton *downloadFolder;
|
||||
IBOutlet NSButtonCell *newArticlesNotificationBounceButton;
|
||||
IBOutlet NSButtonCell *markReadAfterNext;
|
||||
IBOutlet NSButtonCell *markReadAfterDelay;
|
||||
IBOutlet NSButton *markUpdatedAsNew;
|
||||
NSMutableDictionary *appToPathMap;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
NSNotificationCenter * nc = [NSNotificationCenter defaultCenter];
|
||||
|
||||
@@ -24,43 +24,7 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface Preferences : NSObject {
|
||||
NSUserDefaults *userPrefs;
|
||||
float markReadInterval;
|
||||
NSInteger minimumFontSize;
|
||||
NSInteger refreshFrequency;
|
||||
NSInteger autoExpireDuration;
|
||||
NSInteger filterMode;
|
||||
NSInteger layout;
|
||||
NSInteger newArticlesNotification;
|
||||
NSInteger foldersTreeSortMethod;
|
||||
BOOL refreshOnStartup;
|
||||
BOOL alwaysAcceptBetas;
|
||||
BOOL enableMinimumFontSize;
|
||||
BOOL openLinksInVienna;
|
||||
BOOL openLinksInBackground;
|
||||
BOOL hasPrefs;
|
||||
BOOL showFolderImages;
|
||||
BOOL useJavaScript;
|
||||
BOOL showAppInStatusBar;
|
||||
BOOL showStatusBar;
|
||||
BOOL showFilterBar;
|
||||
BOOL shouldSaveFeedSource;
|
||||
BOOL syncGoogleReader;
|
||||
BOOL prefersGoogleNewSubscription;
|
||||
BOOL markUpdatedAsNew;
|
||||
NSString * displayStyle;
|
||||
CGFloat textSizeMultiplier;
|
||||
NSString * defaultDatabase;
|
||||
NSString * feedSourcesFolder;
|
||||
NSFont * articleFont;
|
||||
NSArray * articleSortDescriptors;
|
||||
SearchMethod * searchMethod;
|
||||
NSUInteger concurrentDownloads;
|
||||
NSString * syncServer;
|
||||
NSString * syncScheme;
|
||||
NSString * syncingUser;
|
||||
}
|
||||
@interface Preferences : NSObject
|
||||
|
||||
@property (class, readonly, nonatomic) Preferences *standardPreferences;
|
||||
|
||||
|
||||
@@ -53,7 +53,43 @@ static Preferences * _standardPreferences = nil;
|
||||
|
||||
@end
|
||||
|
||||
@implementation Preferences
|
||||
@implementation Preferences {
|
||||
NSUserDefaults *userPrefs;
|
||||
float markReadInterval;
|
||||
NSInteger minimumFontSize;
|
||||
NSInteger refreshFrequency;
|
||||
NSInteger autoExpireDuration;
|
||||
NSInteger filterMode;
|
||||
NSInteger layout;
|
||||
NSInteger newArticlesNotification;
|
||||
NSInteger foldersTreeSortMethod;
|
||||
BOOL refreshOnStartup;
|
||||
BOOL alwaysAcceptBetas;
|
||||
BOOL enableMinimumFontSize;
|
||||
BOOL openLinksInVienna;
|
||||
BOOL openLinksInBackground;
|
||||
BOOL hasPrefs;
|
||||
BOOL showFolderImages;
|
||||
BOOL useJavaScript;
|
||||
BOOL showAppInStatusBar;
|
||||
BOOL showStatusBar;
|
||||
BOOL showFilterBar;
|
||||
BOOL shouldSaveFeedSource;
|
||||
BOOL syncGoogleReader;
|
||||
BOOL prefersGoogleNewSubscription;
|
||||
BOOL markUpdatedAsNew;
|
||||
NSString *displayStyle;
|
||||
CGFloat textSizeMultiplier;
|
||||
NSString *defaultDatabase;
|
||||
NSString *feedSourcesFolder;
|
||||
NSFont *articleFont;
|
||||
NSArray *articleSortDescriptors;
|
||||
SearchMethod *searchMethod;
|
||||
NSUInteger concurrentDownloads;
|
||||
NSString *syncServer;
|
||||
NSString *syncScheme;
|
||||
NSString *syncingUser;
|
||||
}
|
||||
|
||||
/* standardPreferences
|
||||
* Return the single set of Vienna wide preferences object.
|
||||
|
||||
@@ -20,15 +20,7 @@
|
||||
|
||||
@import Cocoa;
|
||||
|
||||
@interface SyncingPreferencesViewController : NSViewController <NSTextFieldDelegate> {
|
||||
IBOutlet NSPopUpButton * openReaderSource; //List of known service providers
|
||||
NSDictionary * sourcesDict;
|
||||
IBOutlet NSTextField * credentialsInfoText;
|
||||
IBOutlet NSTextField * openReaderHost;
|
||||
IBOutlet NSTextField * username;
|
||||
IBOutlet NSSecureTextField * password;
|
||||
IBOutlet NSButton *__weak syncButton;
|
||||
}
|
||||
@interface SyncingPreferencesViewController : NSViewController <NSTextFieldDelegate>
|
||||
|
||||
@property (weak) IBOutlet NSButton *syncButton;
|
||||
|
||||
|
||||
@@ -30,7 +30,16 @@
|
||||
|
||||
@end
|
||||
|
||||
@implementation SyncingPreferencesViewController
|
||||
@implementation SyncingPreferencesViewController {
|
||||
IBOutlet NSPopUpButton *openReaderSource; // List of known service providers
|
||||
NSDictionary *sourcesDict;
|
||||
IBOutlet NSTextField *credentialsInfoText;
|
||||
IBOutlet NSTextField *openReaderHost;
|
||||
IBOutlet NSTextField *username;
|
||||
IBOutlet NSSecureTextField *password;
|
||||
IBOutlet NSButton *__weak syncButton;
|
||||
}
|
||||
|
||||
static BOOL _credentialsChanged;
|
||||
|
||||
static NSString *syncScheme;
|
||||
|
||||
@@ -20,10 +20,7 @@
|
||||
|
||||
@import Cocoa;
|
||||
|
||||
@interface ExtendedTableView : NSTableView {
|
||||
BOOL delegateImplementsShouldDisplayToolTips;
|
||||
BOOL delegateImplementsToolTip;
|
||||
}
|
||||
@interface ExtendedTableView : NSTableView
|
||||
|
||||
-(void)setHeaderImage:(NSString *)identifier image:(NSImage *)image;
|
||||
|
||||
|
||||
@@ -20,7 +20,10 @@
|
||||
|
||||
#import "TableViewExtensions.h"
|
||||
|
||||
@implementation ExtendedTableView
|
||||
@implementation ExtendedTableView {
|
||||
BOOL delegateImplementsShouldDisplayToolTips;
|
||||
BOOL delegateImplementsToolTip;
|
||||
}
|
||||
|
||||
/* setDelegate
|
||||
* Override the setDelegate for NSTableView so that we record whether or not the
|
||||
|
||||
Reference in New Issue
Block a user