diff --git a/cocoa/base/AppDelegate.h b/cocoa/base/AppDelegate.h
index 315b9a2e..b9739a98 100644
--- a/cocoa/base/AppDelegate.h
+++ b/cocoa/base/AppDelegate.h
@@ -43,10 +43,12 @@ http://www.hardcoded.net/licenses/bsd_license
- (NSMenu *)columnsMenu;
/* Actions */
-- (IBAction)showAboutBox:(id)sender;
+- (IBAction)loadResults:(id)sender;
- (IBAction)openWebsite:(id)sender;
- (IBAction)openHelp:(id)sender;
+- (IBAction)showAboutBox:(id)sender;
+- (IBAction)showDirectoryWindow:(id)sender;
- (IBAction)showPreferencesPanel:(id)sender;
+- (IBAction)showResultWindow:(id)sender;
- (IBAction)startScanning:(id)sender;
-- (IBAction)toggleDirectories:(id)sender;
@end
diff --git a/cocoa/base/AppDelegate.m b/cocoa/base/AppDelegate.m
index 61d849ef..d3e9c045 100644
--- a/cocoa/base/AppDelegate.m
+++ b/cocoa/base/AppDelegate.m
@@ -81,12 +81,20 @@ http://www.hardcoded.net/licenses/bsd_license
- (NSMenu *)columnsMenu { return columnsMenu; }
/* Actions */
-- (IBAction)showAboutBox:(id)sender
+- (IBAction)loadResults:(id)sender
{
- if (_aboutBox == nil) {
- _aboutBox = [[HSAboutBox alloc] initWithApp:py];
+ NSOpenPanel *op = [NSOpenPanel openPanel];
+ [op setCanChooseFiles:YES];
+ [op setCanChooseDirectories:NO];
+ [op setCanCreateDirectories:NO];
+ [op setAllowsMultipleSelection:NO];
+ [op setAllowedFileTypes:[NSArray arrayWithObject:@"dupeguru"]];
+ [op setTitle:@"Select a results file to load"];
+ if ([op runModal] == NSOKButton) {
+ NSString *filename = [[op filenames] objectAtIndex:0];
+ [py loadResultsFrom:filename];
+ [[self recentResults] addFile:filename];
}
- [[_aboutBox window] makeKeyAndOrderFront:sender];
}
- (IBAction)openWebsite:(id)sender
@@ -102,6 +110,19 @@ http://www.hardcoded.net/licenses/bsd_license
[[NSWorkspace sharedWorkspace] openURL:u];
}
+- (IBAction)showAboutBox:(id)sender
+{
+ if (_aboutBox == nil) {
+ _aboutBox = [[HSAboutBox alloc] initWithApp:py];
+ }
+ [[_aboutBox window] makeKeyAndOrderFront:sender];
+}
+
+- (IBAction)showDirectoryWindow:(id)sender
+{
+ [[[self directoryPanel] window] makeKeyAndOrderFront:nil];
+}
+
- (IBAction)showPreferencesPanel:(id)sender
{
if (_preferencesPanel == nil) {
@@ -110,16 +131,16 @@ http://www.hardcoded.net/licenses/bsd_license
[_preferencesPanel showWindow:sender];
}
+- (IBAction)showResultWindow:(id)sender
+{
+ [[[self resultWindow] window] makeKeyAndOrderFront:nil];
+}
+
- (IBAction)startScanning:(id)sender
{
- [[[self resultWindow] window] makeKeyAndOrderFront:sender];
[[self resultWindow] startDuplicateScan:sender];
}
-- (IBAction)toggleDirectories:(id)sender
-{
- [[self directoryPanel] toggleVisible:sender];
-}
/* Delegate */
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
diff --git a/cocoa/base/DirectoryPanel.h b/cocoa/base/DirectoryPanel.h
index 2fbd050f..255345d4 100644
--- a/cocoa/base/DirectoryPanel.h
+++ b/cocoa/base/DirectoryPanel.h
@@ -30,7 +30,6 @@ http://www.hardcoded.net/licenses/bsd_license
- (IBAction)askForDirectory:(id)sender;
- (IBAction)popupAddDirectoryMenu:(id)sender;
- (IBAction)removeSelectedDirectory:(id)sender;
-- (IBAction)toggleVisible:(id)sender;
- (void)addDirectory:(NSString *)directory;
- (void)refreshRemoveButtonText;
diff --git a/cocoa/base/DirectoryPanel.m b/cocoa/base/DirectoryPanel.m
index 525d641d..f4c9af82 100644
--- a/cocoa/base/DirectoryPanel.m
+++ b/cocoa/base/DirectoryPanel.m
@@ -92,11 +92,6 @@ http://www.hardcoded.net/licenses/bsd_license
[self refreshRemoveButtonText];
}
-- (IBAction)toggleVisible:(id)sender
-{
- [[self window] makeKeyAndOrderFront:nil];
-}
-
/* Public */
- (void)addDirectory:(NSString *)directory
{
diff --git a/cocoa/base/ResultWindow.h b/cocoa/base/ResultWindow.h
index a6dc2d2d..4117595f 100644
--- a/cocoa/base/ResultWindow.h
+++ b/cocoa/base/ResultWindow.h
@@ -52,7 +52,6 @@ http://www.hardcoded.net/licenses/bsd_license
- (IBAction)filter:(id)sender;
- (IBAction)ignoreSelected:(id)sender;
- (IBAction)invokeCustomCommand:(id)sender;
-- (IBAction)loadResults:(id)sender;
- (IBAction)markAll:(id)sender;
- (IBAction)markInvert:(id)sender;
- (IBAction)markNone:(id)sender;
diff --git a/cocoa/base/ResultWindow.m b/cocoa/base/ResultWindow.m
index c29b3056..f62010d6 100644
--- a/cocoa/base/ResultWindow.m
+++ b/cocoa/base/ResultWindow.m
@@ -244,22 +244,6 @@ http://www.hardcoded.net/licenses/bsd_license
}
}
-- (IBAction)loadResults:(id)sender
-{
- NSOpenPanel *op = [NSOpenPanel openPanel];
- [op setCanChooseFiles:YES];
- [op setCanChooseDirectories:NO];
- [op setCanCreateDirectories:NO];
- [op setAllowsMultipleSelection:NO];
- [op setAllowedFileTypes:[NSArray arrayWithObject:@"dupeguru"]];
- [op setTitle:@"Select a results file to load"];
- if ([op runModal] == NSOKButton) {
- NSString *filename = [[op filenames] objectAtIndex:0];
- [py loadResultsFrom:filename];
- [[app recentResults] addFile:filename];
- }
-}
-
- (IBAction)markAll:(id)sender
{
[py markAll];
@@ -448,6 +432,7 @@ http://www.hardcoded.net/licenses/bsd_license
- (void)jobStarted:(NSNotification *)aNotification
{
+ [[self window] makeKeyAndOrderFront:nil];
NSDictionary *ui = [aNotification userInfo];
NSString *desc = [ui valueForKey:@"desc"];
[[ProgressController mainProgressController] setJobDesc:desc];
diff --git a/cocoa/base/xib/MainMenu.xib b/cocoa/base/xib/MainMenu.xib
index eeed2a40..7fc5b0d3 100644
--- a/cocoa/base/xib/MainMenu.xib
+++ b/cocoa/base/xib/MainMenu.xib
@@ -12,7 +12,7 @@
+
- 1270
+ 1274
-
- ResultWindow
- ResultWindowBase
-
- YES
-
- YES
- resetColumnsToDefault:
- startDuplicateScan:
-
-
- YES
- id
- id
-
-
-
- YES
-
- YES
- resetColumnsToDefault:
- startDuplicateScan:
-
-
- YES
-
- resetColumnsToDefault:
- id
-
-
- startDuplicateScan:
- id
-
-
-
-
- IBProjectSource
- ResultWindow.h
-
-
ResultWindowBase
NSWindowController
@@ -2185,7 +2189,6 @@
hardlinkMarked:
ignoreSelected:
invokeCustomCommand:
- loadResults:
markAll:
markInvert:
markNone:
@@ -2236,7 +2239,6 @@
id
id
id
- id
@@ -2252,7 +2254,6 @@
hardlinkMarked:
ignoreSelected:
invokeCustomCommand:
- loadResults:
markAll:
markInvert:
markNone:
@@ -2311,10 +2312,6 @@
invokeCustomCommand:
id
-
- loadResults:
- id
-
markAll:
id
@@ -2956,7 +2953,7 @@
YES
- ../../se/dupeguru.xcodeproj
+ ../../me/dupeguru.xcodeproj
3
YES
diff --git a/cocoa/base/xib/ResultWindow.xib b/cocoa/base/xib/ResultWindow.xib
index bd6ab385..eb5a87e7 100644
--- a/cocoa/base/xib/ResultWindow.xib
+++ b/cocoa/base/xib/ResultWindow.xib
@@ -890,14 +890,6 @@
46
-
-
- toggleDirectories:
-
-
-
- 48
-
deleteMarked:
@@ -1090,6 +1082,14 @@
81
+
+
+ showDirectoryWindow:
+
+
+
+ 82
+
@@ -1668,7 +1668,7 @@
- 81
+ 82
@@ -1680,12 +1680,14 @@
YES
YES
+ loadResults:
openHelp:
openWebsite:
showAboutBox:
+ showDirectoryWindow:
showPreferencesPanel:
+ showResultWindow:
startScanning:
- toggleDirectories:
YES
@@ -1695,21 +1697,29 @@
id
id
id
+ id
+ id
YES
YES
+ loadResults:
openHelp:
openWebsite:
showAboutBox:
+ showDirectoryWindow:
showPreferencesPanel:
+ showResultWindow:
startScanning:
- toggleDirectories:
YES
+
+ loadResults:
+ id
+
openHelp:
id
@@ -1722,16 +1732,20 @@
showAboutBox:
id
+
+ showDirectoryWindow:
+ id
+
showPreferencesPanel:
id
- startScanning:
+ showResultWindow:
id
- toggleDirectories:
+ startScanning:
id
@@ -1869,7 +1883,6 @@
hardlinkMarked:
ignoreSelected:
invokeCustomCommand:
- loadResults:
markAll:
markInvert:
markNone:
@@ -1920,7 +1933,6 @@
id
id
id
- id
@@ -1936,7 +1948,6 @@
hardlinkMarked:
ignoreSelected:
invokeCustomCommand:
- loadResults:
markAll:
markInvert:
markNone:
@@ -1995,10 +2006,6 @@
invokeCustomCommand:
id
-
- loadResults:
- id
-
markAll:
id
diff --git a/cocoa/me/ResultWindow.m b/cocoa/me/ResultWindow.m
index 976b0bc7..14b55206 100644
--- a/cocoa/me/ResultWindow.m
+++ b/cocoa/me/ResultWindow.m
@@ -70,10 +70,8 @@ http://www.hardcoded.net/licenses/bsd_license
[_py setIgnoreHardlinkMatches:n2b([ud objectForKey:@"ignoreHardlinkMatches"])];
[_py setMatchSimilarWords:[ud objectForKey:@"matchSimilarWords"]];
NSInteger r = n2i([py doScan]);
- if (r == 3)
- {
+ if (r == 3) {
[Dialogs showMessage:@"The selected directories contain no scannable file."];
- [app toggleDirectories:nil];
}
}
diff --git a/cocoa/pe/ResultWindow.h b/cocoa/pe/ResultWindow.h
index 2bc5746d..8aa1a214 100644
--- a/cocoa/pe/ResultWindow.h
+++ b/cocoa/pe/ResultWindow.h
@@ -11,5 +11,4 @@ http://www.hardcoded.net/licenses/bsd_license
@interface ResultWindow : ResultWindowBase {}
- (IBAction)clearPictureCache:(id)sender;
-- (IBAction)toggleDirectories:(id)sender;
@end
diff --git a/cocoa/pe/ResultWindow.m b/cocoa/pe/ResultWindow.m
index cab7040b..74578df6 100644
--- a/cocoa/pe/ResultWindow.m
+++ b/cocoa/pe/ResultWindow.m
@@ -67,18 +67,12 @@ http://www.hardcoded.net/licenses/bsd_license
}
if (r == 3) {
[Dialogs showMessage:@"The selected directories contain no scannable file."];
- [app toggleDirectories:nil];
}
if (r == 4) {
[Dialogs showMessage:@"The iPhoto application couldn't be found."];
}
}
-- (IBAction)toggleDirectories:(id)sender
-{
- [(AppDelegate *)app toggleDirectories:sender];
-}
-
/* Public */
- (void)initResultColumns
{
diff --git a/cocoa/se/ResultWindow.m b/cocoa/se/ResultWindow.m
index 74c20a43..8f6f036c 100644
--- a/cocoa/se/ResultWindow.m
+++ b/cocoa/se/ResultWindow.m
@@ -59,10 +59,8 @@ http://www.hardcoded.net/licenses/bsd_license
int r = n2i([py doScan]);
if (r != 0)
[[ProgressController mainProgressController] hide];
- if (r == 3)
- {
+ if (r == 3) {
[Dialogs showMessage:@"The selected directories contain no scannable file."];
- [app toggleDirectories:nil];
}
}