You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

79 lines
2.3 KiB

  1. /*
  2. Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
  3. This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
  4. which should be included with this package. The terms are also available at
  5. http://www.gnu.org/licenses/gpl-3.0.html
  6. */
  7. #import <Cocoa/Cocoa.h>
  8. #import "PyDupeGuru.h"
  9. #import "ResultWindow.h"
  10. #import "ResultTable.h"
  11. #import "DetailsPanel.h"
  12. #import "DirectoryPanel.h"
  13. #import "IgnoreListDialog.h"
  14. #import "ProblemDialog.h"
  15. #import "DeletionOptions.h"
  16. #import "HSAboutBox.h"
  17. #import "HSRecentFiles.h"
  18. #import "HSProgressWindow.h"
  19. @interface AppDelegate : NSObject <NSFileManagerDelegate>
  20. {
  21. IBOutlet NSMenu *recentResultsMenu;
  22. IBOutlet NSMenu *columnsMenu;
  23. PyDupeGuru *model;
  24. ResultWindow *_resultWindow;
  25. DirectoryPanel *_directoryPanel;
  26. DetailsPanel *_detailsPanel;
  27. IgnoreListDialog *_ignoreListDialog;
  28. ProblemDialog *_problemDialog;
  29. DeletionOptions *_deletionOptions;
  30. HSProgressWindow *_progressWindow;
  31. NSWindowController *_preferencesPanel;
  32. HSAboutBox *_aboutBox;
  33. HSRecentFiles *_recentResults;
  34. }
  35. @property (readwrite, retain) NSMenu *recentResultsMenu;
  36. @property (readwrite, retain) NSMenu *columnsMenu;
  37. /* Virtual */
  38. + (NSDictionary *)defaultPreferences;
  39. - (PyDupeGuru *)model;
  40. - (DetailsPanel *)createDetailsPanel;
  41. - (void)setScanOptions;
  42. /* Public */
  43. - (ResultWindow *)resultWindow;
  44. - (DirectoryPanel *)directoryPanel;
  45. - (DetailsPanel *)detailsPanel;
  46. - (HSRecentFiles *)recentResults;
  47. - (NSInteger)getAppMode;
  48. - (void)setAppMode:(NSInteger)appMode;
  49. /* Delegate */
  50. - (void)applicationDidFinishLaunching:(NSNotification *)aNotification;
  51. - (void)applicationWillBecomeActive:(NSNotification *)aNotification;
  52. - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender;
  53. - (void)applicationWillTerminate:(NSNotification *)aNotification;
  54. - (void)recentFileClicked:(NSString *)path;
  55. /* Actions */
  56. - (IBAction)clearPictureCache:(id)sender;
  57. - (IBAction)loadResults:(id)sender;
  58. - (IBAction)openWebsite:(id)sender;
  59. - (IBAction)openHelp:(id)sender;
  60. - (IBAction)showAboutBox:(id)sender;
  61. - (IBAction)showDirectoryWindow:(id)sender;
  62. - (IBAction)showPreferencesPanel:(id)sender;
  63. - (IBAction)showResultWindow:(id)sender;
  64. - (IBAction)showIgnoreList:(id)sender;
  65. - (IBAction)startScanning:(id)sender;
  66. /* model --> view */
  67. - (void)showMessage:(NSString *)msg;
  68. @end