From d4f3d2a9779af2211ae4a62d4797d0569af31a10 Mon Sep 17 00:00:00 2001 From: Eitot Date: Sat, 13 May 2023 13:33:19 +0200 Subject: [PATCH] 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. --- .../DSClickableURLTextField.h | 11 ++---- .../DSClickableURLTextField.m | 8 +++- Vienna.xcodeproj/project.pbxproj | 2 + Vienna/Sources/Alerts/NewGroupFolder.h | 8 +--- Vienna/Sources/Alerts/NewGroupFolder.m | 8 +++- Vienna/Sources/Alerts/NewSubscription.h | 21 +--------- Vienna/Sources/Alerts/NewSubscription.m | 19 +++++++++- Vienna/Sources/Alerts/SearchPanel.h | 5 --- Vienna/Sources/Alerts/SearchPanel.m | 6 ++- Vienna/Sources/Application/AppController.h | 29 ++------------ Vienna/Sources/Application/AppController.m | 23 ++++++++++- Vienna/Sources/Database/ArticleRef.h | 4 -- Vienna/Sources/Database/ArticleRef.m | 5 ++- .../Sources/Download window/DownloadWindow.h | 10 +---- .../Sources/Download window/DownloadWindow.m | 8 +++- .../Download window/ImageAndTextCell.h | 15 +------- .../Download window/ImageAndTextCell.m | 14 ++++++- Vienna/Sources/Fetching/RefreshManager.h | 12 +----- Vienna/Sources/Fetching/RefreshManager.m | 10 ++++- Vienna/Sources/Info panel/InfoPanelManager.h | 4 +- Vienna/Sources/Info panel/InfoPanelManager.m | 4 +- Vienna/Sources/Main window/ArticleCellView.h | 8 ---- Vienna/Sources/Main window/ArticleCellView.m | 8 +++- .../Sources/Main window/ArticleController.h | 16 -------- .../Sources/Main window/ArticleController.m | 18 ++++++++- Vienna/Sources/Main window/ArticleListView.h | 35 +---------------- Vienna/Sources/Main window/ArticleListView.m | 29 +++++++++++++- Vienna/Sources/Main window/BackTrackArray.h | 6 +-- Vienna/Sources/Main window/BackTrackArray.m | 6 ++- Vienna/Sources/Main window/EnclosureView.h | 9 ----- Vienna/Sources/Main window/EnclosureView.m | 8 +++- .../Sources/Main window/FoldersFilterable.h | 5 ++- Vienna/Sources/Main window/ProgressTextCell.h | 10 +---- Vienna/Sources/Main window/ProgressTextCell.m | 8 +++- Vienna/Sources/Main window/TreeNode.h | 9 +---- Vienna/Sources/Main window/TreeNode.m | 8 +++- .../Sources/Main window/UnifiedDisplayView.h | 9 ----- .../Sources/Main window/UnifiedDisplayView.m | 9 ++++- Vienna/Sources/Models/Article.h | 12 +----- Vienna/Sources/Models/Article.m | 12 +++++- Vienna/Sources/Models/Folder.h | 7 +--- Vienna/Sources/Models/Folder.m | 8 +++- Vienna/Sources/Models/FolderImageCache.h | 6 +-- Vienna/Sources/Models/FolderImageCache.m | 7 +++- Vienna/Sources/Plug-ins/PluginManager.h | 4 +- Vienna/Sources/Plug-ins/PluginManager.m | 4 +- .../AdvancedPreferencesViewController.h | 5 +-- .../AdvancedPreferencesViewController.m | 5 ++- .../AppearancePreferencesViewController.h | 8 +--- .../AppearancePreferencesViewController.m | 8 +++- .../GeneralPreferencesViewController.h | 16 +------- .../GeneralPreferencesViewController.m | 16 +++++++- .../Sources/Preferences window/Preferences.h | 38 +------------------ .../Sources/Preferences window/Preferences.m | 38 ++++++++++++++++++- .../SyncingPreferencesViewController.h | 10 +---- .../SyncingPreferencesViewController.m | 11 +++++- Vienna/Sources/Shared/TableViewExtensions.h | 5 +-- Vienna/Sources/Shared/TableViewExtensions.m | 5 ++- 58 files changed, 316 insertions(+), 336 deletions(-) diff --git a/External/DSClickableURLTextField/DSClickableURLTextField.h b/External/DSClickableURLTextField/DSClickableURLTextField.h index 21e78ac3..e123143b 100644 --- a/External/DSClickableURLTextField/DSClickableURLTextField.h +++ b/External/DSClickableURLTextField/DSClickableURLTextField.h @@ -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 -@interface DSClickableURLTextField : NSTextField { - NSTextStorage *URLStorage; - NSLayoutManager *URLManager; - NSTextContainer *URLContainer; - NSURL *clickedURL; - BOOL canCopyURLs; -} +@interface DSClickableURLTextField : NSTextField @property (nonatomic) BOOL canCopyURLs; diff --git a/External/DSClickableURLTextField/DSClickableURLTextField.m b/External/DSClickableURLTextField/DSClickableURLTextField.m index cba5938e..39c35336 100644 --- a/External/DSClickableURLTextField/DSClickableURLTextField.m +++ b/External/DSClickableURLTextField/DSClickableURLTextField.m @@ -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. */ diff --git a/Vienna.xcodeproj/project.pbxproj b/Vienna.xcodeproj/project.pbxproj index a978c39a..57b90230 100644 --- a/Vienna.xcodeproj/project.pbxproj +++ b/Vienna.xcodeproj/project.pbxproj @@ -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; diff --git a/Vienna/Sources/Alerts/NewGroupFolder.h b/Vienna/Sources/Alerts/NewGroupFolder.h index eb3b015c..af5eba04 100644 --- a/Vienna/Sources/Alerts/NewGroupFolder.h +++ b/Vienna/Sources/Alerts/NewGroupFolder.h @@ -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; diff --git a/Vienna/Sources/Alerts/NewGroupFolder.m b/Vienna/Sources/Alerts/NewGroupFolder.m index 7575ebde..e045fb70 100644 --- a/Vienna/Sources/Alerts/NewGroupFolder.m +++ b/Vienna/Sources/Alerts/NewGroupFolder.m @@ -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. diff --git a/Vienna/Sources/Alerts/NewSubscription.h b/Vienna/Sources/Alerts/NewSubscription.h index 70510d17..2a406be2 100644 --- a/Vienna/Sources/Alerts/NewSubscription.h +++ b/Vienna/Sources/Alerts/NewSubscription.h @@ -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; diff --git a/Vienna/Sources/Alerts/NewSubscription.m b/Vienna/Sources/Alerts/NewSubscription.m index 25e8f932..7b07f1df 100644 --- a/Vienna/Sources/Alerts/NewSubscription.m +++ b/Vienna/Sources/Alerts/NewSubscription.m @@ -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. diff --git a/Vienna/Sources/Alerts/SearchPanel.h b/Vienna/Sources/Alerts/SearchPanel.h index 4a4f0b80..e546c8f3 100644 --- a/Vienna/Sources/Alerts/SearchPanel.h +++ b/Vienna/Sources/Alerts/SearchPanel.h @@ -21,11 +21,6 @@ @import Cocoa; @interface SearchPanel : NSWindowController -{ - IBOutlet NSWindow * searchPanelWindow; - IBOutlet NSSearchField * searchField; - IBOutlet NSTextField * searchLabel; -} @property NSArray * topObjects; diff --git a/Vienna/Sources/Alerts/SearchPanel.m b/Vienna/Sources/Alerts/SearchPanel.m index 36f656b1..172667d8 100644 --- a/Vienna/Sources/Alerts/SearchPanel.m +++ b/Vienna/Sources/Alerts/SearchPanel.m @@ -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. diff --git a/Vienna/Sources/Application/AppController.h b/Vienna/Sources/Application/AppController.h index f80dd074..dce6ae5a 100644 --- a/Vienna/Sources/Application/AppController.h +++ b/Vienna/Sources/Application/AppController.h @@ -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 -{ - 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 { +#pragma clang diagnostic ignored "-Wobjc-interface-ivars" + Database *db; } @property (nonatomic) IBOutlet SPUStandardUpdaterController *sparkleController; diff --git a/Vienna/Sources/Application/AppController.m b/Vienna/Sources/Application/AppController.m index 7f2ce0d1..0278a69b 100644 --- a/Vienna/Sources/Application/AppController.m +++ b/Vienna/Sources/Application/AppController.m @@ -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; diff --git a/Vienna/Sources/Database/ArticleRef.h b/Vienna/Sources/Database/ArticleRef.h index 9c54281f..c1f8b57a 100644 --- a/Vienna/Sources/Database/ArticleRef.h +++ b/Vienna/Sources/Database/ArticleRef.h @@ -23,10 +23,6 @@ @class Article; @interface ArticleReference : NSObject -{ - NSString * guid; - NSInteger folderId; -} // Public functions +(ArticleReference *)makeReference:(Article *)anArticle; diff --git a/Vienna/Sources/Database/ArticleRef.m b/Vienna/Sources/Database/ArticleRef.m index 3cda322b..93ef6471 100644 --- a/Vienna/Sources/Database/ArticleRef.m +++ b/Vienna/Sources/Database/ArticleRef.m @@ -22,7 +22,10 @@ #import "Article.h" -@implementation ArticleReference +@implementation ArticleReference { + NSString *guid; + NSInteger folderId; +} /* initWithReference */ diff --git a/Vienna/Sources/Download window/DownloadWindow.h b/Vienna/Sources/Download window/DownloadWindow.h index d6bde20a..10c011c7 100644 --- a/Vienna/Sources/Download window/DownloadWindow.h +++ b/Vienna/Sources/Download window/DownloadWindow.h @@ -20,15 +20,7 @@ @import Cocoa; -@class ExtendedTableView; - -@interface DownloadWindow : NSWindowController { - IBOutlet NSWindow * downloadWindow; - IBOutlet ExtendedTableView * table; - IBOutlet NSButton * clearButton; - NSInteger lastCount; - NSMenu * openWithMenu; -} +@interface DownloadWindow : NSWindowController // Public functions -(IBAction)clearList:(id)sender; diff --git a/Vienna/Sources/Download window/DownloadWindow.m b/Vienna/Sources/Download window/DownloadWindow.m index 04ae26d7..e79d521e 100644 --- a/Vienna/Sources/Download window/DownloadWindow.m +++ b/Vienna/Sources/Download window/DownloadWindow.m @@ -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. diff --git a/Vienna/Sources/Download window/ImageAndTextCell.h b/Vienna/Sources/Download window/ImageAndTextCell.h index 1d0bece8..75c4ac49 100644 --- a/Vienna/Sources/Download window/ImageAndTextCell.h +++ b/Vienna/Sources/Download window/ImageAndTextCell.h @@ -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; diff --git a/Vienna/Sources/Download window/ImageAndTextCell.m b/Vienna/Sources/Download window/ImageAndTextCell.m index fa7b76be..ceb1ef01 100644 --- a/Vienna/Sources/Download window/ImageAndTextCell.m +++ b/Vienna/Sources/Download window/ImageAndTextCell.m @@ -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; diff --git a/Vienna/Sources/Fetching/RefreshManager.h b/Vienna/Sources/Fetching/RefreshManager.h index 09aa9a26..3dc895c0 100644 --- a/Vienna/Sources/Fetching/RefreshManager.h +++ b/Vienna/Sources/Fetching/RefreshManager.h @@ -20,19 +20,9 @@ @import Foundation; -@class Database; -@class FeedCredentials; @class Folder; -@interface RefreshManager : NSObject { - NSUInteger countOfNewArticles; - NSMutableArray * authQueue; - FeedCredentials * credentialsController; - BOOL hasStarted; - NSString * statusMessageDuringRefresh; - NSOperationQueue *networkQueue; - dispatch_queue_t _queue; -} +@interface RefreshManager : NSObject @property (class, readonly, nonatomic) RefreshManager *sharedManager; diff --git a/Vienna/Sources/Fetching/RefreshManager.m b/Vienna/Sources/Fetching/RefreshManager.m index 90119801..e9c68ad8 100644 --- a/Vienna/Sources/Fetching/RefreshManager.m +++ b/Vienna/Sources/Fetching/RefreshManager.m @@ -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 { diff --git a/Vienna/Sources/Info panel/InfoPanelManager.h b/Vienna/Sources/Info panel/InfoPanelManager.h index 8b5204f6..615212c7 100644 --- a/Vienna/Sources/Info panel/InfoPanelManager.h +++ b/Vienna/Sources/Info panel/InfoPanelManager.h @@ -22,9 +22,7 @@ @class InfoPanelController; -@interface InfoPanelManager : NSObject { - NSMutableDictionary * controllerList; -} +@interface InfoPanelManager : NSObject @property (class, readonly, nonatomic) InfoPanelManager *infoWindowManager; diff --git a/Vienna/Sources/Info panel/InfoPanelManager.m b/Vienna/Sources/Info panel/InfoPanelManager.m index 000b6e0a..95395434 100644 --- a/Vienna/Sources/Info panel/InfoPanelManager.m +++ b/Vienna/Sources/Info panel/InfoPanelManager.m @@ -25,7 +25,9 @@ #import "Database.h" #import "InfoPanelController.h" -@implementation InfoPanelManager +@implementation InfoPanelManager { + NSMutableDictionary *controllerList; +} /* infoWindowManager * Returns the shared instance of the InfoWindowManager diff --git a/Vienna/Sources/Main window/ArticleCellView.h b/Vienna/Sources/Main window/ArticleCellView.h index bec6bcde..5193e29e 100644 --- a/Vienna/Sources/Main window/ArticleCellView.h +++ b/Vienna/Sources/Main window/ArticleCellView.h @@ -8,18 +8,10 @@ @import Cocoa; @import WebKit; -@class AppController; @class ArticleConverter; @protocol ArticleContentView; @interface ArticleCellView : NSTableCellView -{ - AppController * controller; - BOOL inProgress; - NSInteger folderId; - NSUInteger articleRow; - NSTableView *__weak _listView; -} @property (readonly) NSObject *articleView; @property (readonly) ArticleConverter * articleConverter; diff --git a/Vienna/Sources/Main window/ArticleCellView.m b/Vienna/Sources/Main window/ArticleCellView.m index db2a5fc0..e657b1f1 100644 --- a/Vienna/Sources/Main window/ArticleCellView.m +++ b/Vienna/Sources/Main window/ArticleCellView.m @@ -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; diff --git a/Vienna/Sources/Main window/ArticleController.h b/Vienna/Sources/Main window/ArticleController.h index 5fec0215..51c25fa3 100644 --- a/Vienna/Sources/Main window/ArticleController.h +++ b/Vienna/Sources/Main window/ArticleController.h @@ -38,22 +38,6 @@ * controller. */ @interface ArticleController : NSViewController -{ - NSView * 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; diff --git a/Vienna/Sources/Main window/ArticleController.m b/Vienna/Sources/Main window/ArticleController.m index 9d448241..b6ac95a5 100644 --- a/Vienna/Sources/Main window/ArticleController.m +++ b/Vienna/Sources/Main window/ArticleController.m @@ -50,7 +50,23 @@ static void *VNAArticleControllerObserverContext = &VNAArticleControllerObserver @end -@implementation ArticleController +@implementation ArticleController { + NSView *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 diff --git a/Vienna/Sources/Main window/ArticleListView.h b/Vienna/Sources/Main window/ArticleListView.h index 352f2017..220e8914 100644 --- a/Vienna/Sources/Main window/ArticleListView.h +++ b/Vienna/Sources/Main window/ArticleListView.h @@ -25,40 +25,7 @@ #import "ArticleViewDelegate.h" #import "MessageListView.h" -@class AppController; -@class ArticleView; -@protocol ArticleContentView; -@protocol Tab; - -@interface ArticleListView : NSView -{ - IBOutlet MessageListView * articleList; - NSObject *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 // Public functions -(void)updateVisibleColumns; diff --git a/Vienna/Sources/Main window/ArticleListView.m b/Vienna/Sources/Main window/ArticleListView.m index 4f263834..c209f702 100644 --- a/Vienna/Sources/Main window/ArticleListView.m +++ b/Vienna/Sources/Main window/ArticleListView.m @@ -70,7 +70,34 @@ static void *VNAArticleListViewObserverContext = &VNAArticleListViewObserverCont @end -@implementation ArticleListView +@implementation ArticleListView { + IBOutlet MessageListView *articleList; + NSObject *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. diff --git a/Vienna/Sources/Main window/BackTrackArray.h b/Vienna/Sources/Main window/BackTrackArray.h index 40c8b51f..9d61f71a 100644 --- a/Vienna/Sources/Main window/BackTrackArray.h +++ b/Vienna/Sources/Main window/BackTrackArray.h @@ -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*/; diff --git a/Vienna/Sources/Main window/BackTrackArray.m b/Vienna/Sources/Main window/BackTrackArray.m index 13582a52..16253620 100644 --- a/Vienna/Sources/Main window/BackTrackArray.m +++ b/Vienna/Sources/Main window/BackTrackArray.m @@ -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 diff --git a/Vienna/Sources/Main window/EnclosureView.h b/Vienna/Sources/Main window/EnclosureView.h index d180e6c0..48bf8021 100644 --- a/Vienna/Sources/Main window/EnclosureView.h +++ b/Vienna/Sources/Main window/EnclosureView.h @@ -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; diff --git a/Vienna/Sources/Main window/EnclosureView.m b/Vienna/Sources/Main window/EnclosureView.m index ffc9c6f0..3b000bdc 100644 --- a/Vienna/Sources/Main window/EnclosureView.m +++ b/Vienna/Sources/Main window/EnclosureView.m @@ -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. diff --git a/Vienna/Sources/Main window/FoldersFilterable.h b/Vienna/Sources/Main window/FoldersFilterable.h index 2948a3a8..5484f5f3 100644 --- a/Vienna/Sources/Main window/FoldersFilterable.h +++ b/Vienna/Sources/Main window/FoldersFilterable.h @@ -9,8 +9,11 @@ @import Cocoa; @interface FoldersFilterableDataSource : NSObject { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wobjc-interface-ivars" @protected -__unsafe_unretained id _dataSource; + __unsafe_unretained id _dataSource; +#pragma clang diagnostic pop } - (instancetype)initWithDataSource:(id)dataSource /*NS_DESIGNATED_INITIALIZER*/; diff --git a/Vienna/Sources/Main window/ProgressTextCell.h b/Vienna/Sources/Main window/ProgressTextCell.h index c9508972..4064e1db 100644 --- a/Vienna/Sources/Main window/ProgressTextCell.h +++ b/Vienna/Sources/Main window/ProgressTextCell.h @@ -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; diff --git a/Vienna/Sources/Main window/ProgressTextCell.m b/Vienna/Sources/Main window/ProgressTextCell.m index 846b9af4..6adfc104 100644 --- a/Vienna/Sources/Main window/ProgressTextCell.m +++ b/Vienna/Sources/Main window/ProgressTextCell.m @@ -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. diff --git a/Vienna/Sources/Main window/TreeNode.h b/Vienna/Sources/Main window/TreeNode.h index 9d88dc09..9fee0c5f 100644 --- a/Vienna/Sources/Main window/TreeNode.h +++ b/Vienna/Sources/Main window/TreeNode.h @@ -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*/; diff --git a/Vienna/Sources/Main window/TreeNode.m b/Vienna/Sources/Main window/TreeNode.m index bd376825..7fd74ba1 100644 --- a/Vienna/Sources/Main window/TreeNode.m +++ b/Vienna/Sources/Main window/TreeNode.m @@ -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. diff --git a/Vienna/Sources/Main window/UnifiedDisplayView.h b/Vienna/Sources/Main window/UnifiedDisplayView.h index dee335c4..73766bd8 100644 --- a/Vienna/Sources/Main window/UnifiedDisplayView.h +++ b/Vienna/Sources/Main window/UnifiedDisplayView.h @@ -23,17 +23,8 @@ #import "MessageListView.h" @class AppController; -@class ExtendedTableView; @interface UnifiedDisplayView : NSView -{ - IBOutlet ExtendedTableView *articleList; - - NSTimer * markReadTimer; - - NSMutableArray * rowHeightArray; - NSProgressIndicator * progressIndicator; -} @property (weak, nonatomic) AppController *controller; diff --git a/Vienna/Sources/Main window/UnifiedDisplayView.m b/Vienna/Sources/Main window/UnifiedDisplayView.m index c61fae33..74b5f5f5 100644 --- a/Vienna/Sources/Main window/UnifiedDisplayView.m +++ b/Vienna/Sources/Main window/UnifiedDisplayView.m @@ -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 diff --git a/Vienna/Sources/Models/Article.h b/Vienna/Sources/Models/Article.h index a9ac205b..94c6a850 100644 --- a/Vienna/Sources/Models/Article.h +++ b/Vienna/Sources/Models/Article.h @@ -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*/; diff --git a/Vienna/Sources/Models/Article.m b/Vienna/Sources/Models/Article.m index 6e3110ca..9f6b8c36 100644 --- a/Vienna/Sources/Models/Article.m +++ b/Vienna/Sources/Models/Article.m @@ -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 { diff --git a/Vienna/Sources/Models/Folder.h b/Vienna/Sources/Models/Folder.h index 9735eec0..724f7a96 100644 --- a/Vienna/Sources/Models/Folder.h +++ b/Vienna/Sources/Models/Folder.h @@ -68,12 +68,7 @@ typedef NS_OPTIONS(NSUInteger, VNAFolderFlag) { VNAFolderFlagBuggySync = 1 << 7 }; -@interface Folder : NSObject { - NSInteger unreadCount; - NSInteger childUnreadCount; - VNAFolderFlag nonPersistedFlags; - VNAFolderFlag flags; -} +@interface Folder : NSObject // Initialisation functions -(instancetype)initWithId:(NSInteger)itemId parentId:(NSInteger)parentId name:(NSString *)name type:(VNAFolderType)type /*NS_DESIGNATED_INITIALIZER*/; diff --git a/Vienna/Sources/Models/Folder.m b/Vienna/Sources/Models/Folder.m index 27d894fb..9758945f 100644 --- a/Vienna/Sources/Models/Folder.m +++ b/Vienna/Sources/Models/Folder.m @@ -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. diff --git a/Vienna/Sources/Models/FolderImageCache.h b/Vienna/Sources/Models/FolderImageCache.h index ac3dba5e..2746b5f1 100644 --- a/Vienna/Sources/Models/FolderImageCache.h +++ b/Vienna/Sources/Models/FolderImageCache.h @@ -8,11 +8,7 @@ @import Cocoa; -@interface FolderImageCache : NSObject { - NSString * imagesCacheFolder; - NSMutableDictionary * folderImagesArray; - BOOL initializedFolderImagesArray; -} +@interface FolderImageCache : NSObject @property (class, readonly, nonatomic) FolderImageCache *defaultCache; diff --git a/Vienna/Sources/Models/FolderImageCache.m b/Vienna/Sources/Models/FolderImageCache.m index 78537975..61f12802 100644 --- a/Vienna/Sources/Models/FolderImageCache.m +++ b/Vienna/Sources/Models/FolderImageCache.m @@ -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 diff --git a/Vienna/Sources/Plug-ins/PluginManager.h b/Vienna/Sources/Plug-ins/PluginManager.h index 9610f27d..ed3a3e81 100644 --- a/Vienna/Sources/Plug-ins/PluginManager.h +++ b/Vienna/Sources/Plug-ins/PluginManager.h @@ -22,9 +22,7 @@ @class SearchMethod; -@interface PluginManager : NSObject { - NSMutableDictionary * allPlugins; -} +@interface PluginManager : NSObject -(void)resetPlugins; @property (class, readonly, nonatomic) NSURL *plugInsDirectoryURL; diff --git a/Vienna/Sources/Plug-ins/PluginManager.m b/Vienna/Sources/Plug-ins/PluginManager.m index 18a922d0..5f25057e 100644 --- a/Vienna/Sources/Plug-ins/PluginManager.m +++ b/Vienna/Sources/Plug-ins/PluginManager.m @@ -31,7 +31,9 @@ static NSString * const VNAPlugInsDirectoryName = @"Plugins"; -@implementation PluginManager +@implementation PluginManager { + NSMutableDictionary *allPlugins; +} /* init * Initialises the plugin manager. diff --git a/Vienna/Sources/Preferences window/AdvancedPreferencesViewController.h b/Vienna/Sources/Preferences window/AdvancedPreferencesViewController.h index ef5fd543..f0ced21f 100644 --- a/Vienna/Sources/Preferences window/AdvancedPreferencesViewController.h +++ b/Vienna/Sources/Preferences window/AdvancedPreferencesViewController.h @@ -20,10 +20,7 @@ @import Cocoa; -@interface AdvancedPreferencesViewController : NSViewController { - IBOutlet NSButton * useJavaScriptButton; - IBOutlet NSPopUpButton * concurrentDownloads; -} +@interface AdvancedPreferencesViewController : NSViewController // Action functions -(IBAction)changeUseJavaScript:(id)sender; diff --git a/Vienna/Sources/Preferences window/AdvancedPreferencesViewController.m b/Vienna/Sources/Preferences window/AdvancedPreferencesViewController.m index 7c1bd632..242577b2 100644 --- a/Vienna/Sources/Preferences window/AdvancedPreferencesViewController.m +++ b/Vienna/Sources/Preferences window/AdvancedPreferencesViewController.m @@ -27,7 +27,10 @@ @end -@implementation AdvancedPreferencesViewController +@implementation AdvancedPreferencesViewController { + IBOutlet NSButton *useJavaScriptButton; + IBOutlet NSPopUpButton *concurrentDownloads; +} - (void)viewDidLoad { [super viewDidLoad]; diff --git a/Vienna/Sources/Preferences window/AppearancePreferencesViewController.h b/Vienna/Sources/Preferences window/AppearancePreferencesViewController.h index 6907011b..0f8e0b51 100644 --- a/Vienna/Sources/Preferences window/AppearancePreferencesViewController.h +++ b/Vienna/Sources/Preferences window/AppearancePreferencesViewController.h @@ -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; diff --git a/Vienna/Sources/Preferences window/AppearancePreferencesViewController.m b/Vienna/Sources/Preferences window/AppearancePreferencesViewController.m index ad05fe2d..1a3dd0bc 100644 --- a/Vienna/Sources/Preferences window/AppearancePreferencesViewController.m +++ b/Vienna/Sources/Preferences window/AppearancePreferencesViewController.m @@ -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]; diff --git a/Vienna/Sources/Preferences window/GeneralPreferencesViewController.h b/Vienna/Sources/Preferences window/GeneralPreferencesViewController.h index 05dbcde5..8823d4ea 100644 --- a/Vienna/Sources/Preferences window/GeneralPreferencesViewController.h +++ b/Vienna/Sources/Preferences window/GeneralPreferencesViewController.h @@ -20,21 +20,7 @@ @import Cocoa; -@interface GeneralPreferencesViewController : NSViewController { - 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 // Action functions -(IBAction)changeCheckFrequency:(id)sender; diff --git a/Vienna/Sources/Preferences window/GeneralPreferencesViewController.m b/Vienna/Sources/Preferences window/GeneralPreferencesViewController.m index 839d0f42..1d44dc32 100644 --- a/Vienna/Sources/Preferences window/GeneralPreferencesViewController.m +++ b/Vienna/Sources/Preferences window/GeneralPreferencesViewController.m @@ -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]; diff --git a/Vienna/Sources/Preferences window/Preferences.h b/Vienna/Sources/Preferences window/Preferences.h index 950d0fb6..cf0aebb5 100644 --- a/Vienna/Sources/Preferences window/Preferences.h +++ b/Vienna/Sources/Preferences window/Preferences.h @@ -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; diff --git a/Vienna/Sources/Preferences window/Preferences.m b/Vienna/Sources/Preferences window/Preferences.m index 66a91939..f8c23911 100644 --- a/Vienna/Sources/Preferences window/Preferences.m +++ b/Vienna/Sources/Preferences window/Preferences.m @@ -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. diff --git a/Vienna/Sources/Preferences window/SyncingPreferencesViewController.h b/Vienna/Sources/Preferences window/SyncingPreferencesViewController.h index 2cb6aec3..b0c2874f 100644 --- a/Vienna/Sources/Preferences window/SyncingPreferencesViewController.h +++ b/Vienna/Sources/Preferences window/SyncingPreferencesViewController.h @@ -20,15 +20,7 @@ @import Cocoa; -@interface SyncingPreferencesViewController : NSViewController { - 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 @property (weak) IBOutlet NSButton *syncButton; diff --git a/Vienna/Sources/Preferences window/SyncingPreferencesViewController.m b/Vienna/Sources/Preferences window/SyncingPreferencesViewController.m index d662061c..d6769999 100644 --- a/Vienna/Sources/Preferences window/SyncingPreferencesViewController.m +++ b/Vienna/Sources/Preferences window/SyncingPreferencesViewController.m @@ -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; diff --git a/Vienna/Sources/Shared/TableViewExtensions.h b/Vienna/Sources/Shared/TableViewExtensions.h index 55a1992f..b3475a3c 100644 --- a/Vienna/Sources/Shared/TableViewExtensions.h +++ b/Vienna/Sources/Shared/TableViewExtensions.h @@ -20,10 +20,7 @@ @import Cocoa; -@interface ExtendedTableView : NSTableView { - BOOL delegateImplementsShouldDisplayToolTips; - BOOL delegateImplementsToolTip; -} +@interface ExtendedTableView : NSTableView -(void)setHeaderImage:(NSString *)identifier image:(NSImage *)image; diff --git a/Vienna/Sources/Shared/TableViewExtensions.m b/Vienna/Sources/Shared/TableViewExtensions.m index b9ce517a..59f6559d 100644 --- a/Vienna/Sources/Shared/TableViewExtensions.m +++ b/Vienna/Sources/Shared/TableViewExtensions.m @@ -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