2009-08-05 08:59:46 +00:00
|
|
|
/*
|
2015-01-03 21:30:57 +00:00
|
|
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
2009-08-05 08:59:46 +00:00
|
|
|
|
2015-01-03 21:33:16 +00:00
|
|
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
2009-08-05 08:59:46 +00:00
|
|
|
which should be included with this package. The terms are also available at
|
2015-01-03 21:33:16 +00:00
|
|
|
http://www.gnu.org/licenses/gpl-3.0.html
|
2009-08-05 08:59:46 +00:00
|
|
|
*/
|
|
|
|
|
2009-06-01 09:55:11 +00:00
|
|
|
#import <Cocoa/Cocoa.h>
|
2012-07-27 22:30:34 +00:00
|
|
|
#import <Sparkle/SUUpdater.h>
|
2009-06-01 09:55:11 +00:00
|
|
|
#import "PyDupeGuru.h"
|
2009-10-30 14:40:17 +00:00
|
|
|
#import "ResultWindow.h"
|
2016-06-05 01:18:14 +00:00
|
|
|
#import "ResultTable.h"
|
2009-11-02 15:16:34 +00:00
|
|
|
#import "DetailsPanel.h"
|
2010-02-05 15:51:00 +00:00
|
|
|
#import "DirectoryPanel.h"
|
2012-03-14 16:47:21 +00:00
|
|
|
#import "IgnoreListDialog.h"
|
2016-06-06 01:18:48 +00:00
|
|
|
#import "ProblemDialog.h"
|
|
|
|
#import "DeletionOptions.h"
|
2013-11-30 22:54:40 +00:00
|
|
|
#import "HSAboutBox.h"
|
2011-01-13 15:20:03 +00:00
|
|
|
#import "HSRecentFiles.h"
|
2013-08-03 20:27:36 +00:00
|
|
|
#import "HSProgressWindow.h"
|
2009-06-01 09:55:11 +00:00
|
|
|
|
2016-06-06 01:18:48 +00:00
|
|
|
@interface AppDelegate : NSObject <NSFileManagerDelegate>
|
2009-06-01 09:55:11 +00:00
|
|
|
{
|
2012-07-27 22:30:34 +00:00
|
|
|
NSMenu *recentResultsMenu;
|
|
|
|
NSMenu *columnsMenu;
|
|
|
|
SUUpdater *updater;
|
2009-06-01 09:55:11 +00:00
|
|
|
|
2012-01-13 19:43:43 +00:00
|
|
|
PyDupeGuru *model;
|
2016-06-05 01:18:14 +00:00
|
|
|
ResultWindow *_resultWindow;
|
2010-02-05 16:05:00 +00:00
|
|
|
DirectoryPanel *_directoryPanel;
|
2010-02-05 16:15:45 +00:00
|
|
|
DetailsPanel *_detailsPanel;
|
2012-03-14 16:47:21 +00:00
|
|
|
IgnoreListDialog *_ignoreListDialog;
|
2016-06-06 01:18:48 +00:00
|
|
|
ProblemDialog *_problemDialog;
|
|
|
|
DeletionOptions *_deletionOptions;
|
2013-08-03 20:27:36 +00:00
|
|
|
HSProgressWindow *_progressWindow;
|
2011-01-14 13:06:54 +00:00
|
|
|
NSWindowController *_preferencesPanel;
|
2013-11-30 22:54:40 +00:00
|
|
|
HSAboutBox *_aboutBox;
|
2011-01-13 15:20:03 +00:00
|
|
|
HSRecentFiles *_recentResults;
|
2009-06-01 09:55:11 +00:00
|
|
|
}
|
2011-01-14 12:56:50 +00:00
|
|
|
|
2012-07-27 22:30:34 +00:00
|
|
|
@property (readwrite, retain) NSMenu *recentResultsMenu;
|
|
|
|
@property (readwrite, retain) NSMenu *columnsMenu;
|
|
|
|
@property (readwrite, retain) SUUpdater *updater;
|
|
|
|
|
2011-01-14 12:56:50 +00:00
|
|
|
/* Virtual */
|
2012-07-31 14:27:36 +00:00
|
|
|
+ (NSDictionary *)defaultPreferences;
|
2012-01-13 19:43:43 +00:00
|
|
|
- (PyDupeGuru *)model;
|
2011-01-14 12:56:50 +00:00
|
|
|
- (DetailsPanel *)createDetailsPanel;
|
2016-06-05 01:18:14 +00:00
|
|
|
- (void)setScanOptions;
|
2011-01-14 12:56:50 +00:00
|
|
|
|
|
|
|
/* Public */
|
2012-07-27 22:30:34 +00:00
|
|
|
- (void)finalizeInit;
|
2016-06-05 01:18:14 +00:00
|
|
|
- (ResultWindow *)resultWindow;
|
2010-02-05 16:05:00 +00:00
|
|
|
- (DirectoryPanel *)directoryPanel;
|
2010-02-05 16:15:45 +00:00
|
|
|
- (DetailsPanel *)detailsPanel;
|
2011-01-13 15:20:03 +00:00
|
|
|
- (HSRecentFiles *)recentResults;
|
2016-06-06 01:18:48 +00:00
|
|
|
- (NSInteger)getAppMode;
|
|
|
|
- (void)setAppMode:(NSInteger)appMode;
|
2010-12-30 12:00:44 +00:00
|
|
|
|
2011-09-06 14:03:14 +00:00
|
|
|
/* Delegate */
|
|
|
|
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification;
|
|
|
|
- (void)applicationWillBecomeActive:(NSNotification *)aNotification;
|
|
|
|
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender;
|
|
|
|
- (void)applicationWillTerminate:(NSNotification *)aNotification;
|
|
|
|
- (void)recentFileClicked:(NSString *)path;
|
|
|
|
|
2011-01-14 12:56:50 +00:00
|
|
|
/* Actions */
|
2016-06-06 01:18:48 +00:00
|
|
|
- (void)clearPictureCache;
|
2012-07-27 22:30:34 +00:00
|
|
|
- (void)loadResults;
|
|
|
|
- (void)openWebsite;
|
|
|
|
- (void)openHelp;
|
|
|
|
- (void)showAboutBox;
|
|
|
|
- (void)showDirectoryWindow;
|
|
|
|
- (void)showPreferencesPanel;
|
|
|
|
- (void)showResultWindow;
|
|
|
|
- (void)showIgnoreList;
|
|
|
|
- (void)startScanning;
|
2011-09-21 19:24:26 +00:00
|
|
|
|
|
|
|
/* model --> view */
|
2011-09-22 14:35:17 +00:00
|
|
|
- (void)showMessage:(NSString *)msg;
|
2009-06-01 09:55:11 +00:00
|
|
|
@end
|