The main window of dupeGuru is now the directories window (and its Done button is replaced by a Start Scanning button).

This commit is contained in:
Virgil Dupras 2011-01-14 14:41:43 +01:00
parent 5e47b9f4a7
commit 90e2a1cda0
7 changed files with 188 additions and 110 deletions

View File

@ -47,5 +47,6 @@ http://www.hardcoded.net/licenses/bsd_license
- (IBAction)openWebsite:(id)sender;
- (IBAction)openHelp:(id)sender;
- (IBAction)showPreferencesPanel:(id)sender;
- (IBAction)startScanning:(id)sender;
- (IBAction)toggleDirectories:(id)sender;
@end

View File

@ -24,6 +24,7 @@ http://www.hardcoded.net/licenses/bsd_license
_preferencesPanel = nil;
_recentResults = [[HSRecentFiles alloc] initWithName:@"recentResults" menu:recentResultsMenu];
[_recentResults setDelegate:self];
[[[self directoryPanel] window] makeKeyAndOrderFront:self];
}
/* Virtual */
@ -109,6 +110,12 @@ http://www.hardcoded.net/licenses/bsd_license
[_preferencesPanel showWindow:sender];
}
- (IBAction)startScanning:(id)sender
{
[[[self resultWindow] window] makeKeyAndOrderFront:sender];
[[self resultWindow] startDuplicateScan:sender];
}
- (IBAction)toggleDirectories:(id)sender
{
[[self directoryPanel] toggleVisible:sender];
@ -132,8 +139,9 @@ http://www.hardcoded.net/licenses/bsd_license
- (void)applicationWillBecomeActive:(NSNotification *)aNotification
{
if (![[[self resultWindow] window] isVisible])
[[self resultWindow] showWindow:NSApp];
if (![[[self directoryPanel] window] isVisible]) {
[[self directoryPanel] showWindow:NSApp];
}
}
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender

View File

@ -407,11 +407,6 @@ http://www.hardcoded.net/licenses/bsd_license
}
/* Notifications */
- (void)windowWillClose:(NSNotification *)aNotification
{
[NSApp hide:NSApp];
}
- (void)jobCompleted:(NSNotification *)aNotification
{
id lastAction = [[ProgressController mainProgressController] jobId];
@ -444,10 +439,6 @@ http://www.hardcoded.net/licenses/bsd_license
if (rowCount == 0)
[Dialogs showMessage:@"No duplicates found."];
}
// Re-activate toolbar items right after the progress bar stops showing instead of waiting until
// a mouse-over is performed
[[[self window] toolbar] validateVisibleItems];
}
- (void)jobInProgress:(NSNotification *)aNotification

View File

@ -12,7 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="8"/>
<integer value="6"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -364,7 +364,7 @@
<object class="NSButton" id="963602908">
<reference key="NSNextResponder" ref="53314480"/>
<int key="NSvFlags">289</int>
<string key="NSFrame">{{152, 18}, {90, 32}}</string>
<string key="NSFrame">{{104, 18}, {90, 32}}</string>
<reference key="NSSuperview" ref="53314480"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="499943638">
@ -387,7 +387,7 @@
<object class="NSButton" id="630693842">
<reference key="NSNextResponder" ref="53314480"/>
<int key="NSvFlags">289</int>
<string key="NSFrame">{{62, 18}, {90, 32}}</string>
<string key="NSFrame">{{14, 18}, {90, 32}}</string>
<reference key="NSSuperview" ref="53314480"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="308259119">
@ -408,13 +408,13 @@
<object class="NSButton" id="580397230">
<reference key="NSNextResponder" ref="53314480"/>
<int key="NSvFlags">289</int>
<string key="NSFrame">{{265, 18}, {90, 32}}</string>
<string key="NSFrame">{{224, 18}, {131, 32}}</string>
<reference key="NSSuperview" ref="53314480"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="799888482">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Done</string>
<string key="NSContents">Start Scanning</string>
<reference key="NSSupport" ref="156117695"/>
<reference key="NSControlView" ref="580397230"/>
<int key="NSButtonFlags">-2038284033</int>
@ -479,14 +479,6 @@
</object>
<int key="connectionID">26</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">performClose:</string>
<reference key="source" ref="970147395"/>
<reference key="destination" ref="580397230"/>
</object>
<int key="connectionID">32</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">removeButton</string>
@ -511,6 +503,14 @@
</object>
<int key="connectionID">58</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">startScanning:</string>
<reference key="source" ref="244639324"/>
<reference key="destination" ref="580397230"/>
</object>
<int key="connectionID">60</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@ -558,9 +558,9 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1031103869"/>
<reference ref="242279311"/>
<reference ref="580397230"/>
<reference ref="630693842"/>
<reference ref="963602908"/>
<reference ref="580397230"/>
</object>
<reference key="parent" ref="970147395"/>
</object>
@ -759,10 +759,13 @@
<string>15.IBPluginDependency</string>
<string>15.ImportedFromIB2</string>
<string>17.IBPluginDependency</string>
<string>17.IBViewBoundsToFrameTransform</string>
<string>17.ImportedFromIB2</string>
<string>18.IBPluginDependency</string>
<string>18.IBViewBoundsToFrameTransform</string>
<string>18.ImportedFromIB2</string>
<string>31.IBPluginDependency</string>
<string>31.IBViewBoundsToFrameTransform</string>
<string>31.ImportedFromIB2</string>
<string>45.IBPluginDependency</string>
<string>46.IBPluginDependency</string>
@ -814,10 +817,19 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCeAAAwkAAAA</bytes>
</object>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDGAAAwkAAAA</bytes>
</object>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDdQAAwkAAAA</bytes>
</object>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@ -870,11 +882,118 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">59</int>
<int key="maxID">60</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">AppDelegateBase</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>openHelp:</string>
<string>openWebsite:</string>
<string>showAboutBox:</string>
<string>showPreferencesPanel:</string>
<string>startScanning:</string>
<string>toggleDirectories:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>openHelp:</string>
<string>openWebsite:</string>
<string>showAboutBox:</string>
<string>showPreferencesPanel:</string>
<string>startScanning:</string>
<string>toggleDirectories:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">openHelp:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">openWebsite:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">showAboutBox:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">showPreferencesPanel:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">startScanning:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">toggleDirectories:</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>columnsMenu</string>
<string>py</string>
<string>recentResultsMenu</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSMenu</string>
<string>PyDupeGuruBase</string>
<string>NSMenu</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>columnsMenu</string>
<string>py</string>
<string>recentResultsMenu</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">columnsMenu</string>
<string key="candidateClassName">NSMenu</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">py</string>
<string key="candidateClassName">PyDupeGuruBase</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">recentResultsMenu</string>
<string key="candidateClassName">NSMenu</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../base/AppDelegate.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">DirectoryPanel</string>
<string key="superclassName">NSWindowController</string>
@ -1014,6 +1133,30 @@
<string key="className">NSTableView</string>
<reference key="sourceIdentifier" ref="42597526"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">PyApp</string>
<string key="superclassName">PyFairware</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../PyApp.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">PyDupeGuruBase</string>
<string key="superclassName">PyApp</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../base/PyDupeGuru.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">PyFairware</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../PyFairware.h</string>
</object>
</object>
</object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>

View File

@ -115,7 +115,7 @@
<int key="NSWindowStyleMask">15</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{47, 310}, {557, 400}}</string>
<int key="NSWTFlags">1886912512</int>
<int key="NSWTFlags">1618477056</int>
<string key="NSWindowTitle">dupeGuru</string>
<string key="NSWindowClass">NSWindow</string>
<object class="NSToolbar" key="NSViewClass" id="983262794">
@ -133,7 +133,6 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>3E17CA47-6688-44FC-963C-CF22D780305F</string>
<string>4BD1D94E-8A70-48E1-AF8A-CEDC80CD0A5E</string>
<string>8E5ADD0F-24AD-452A-BE68-464FE9E5E240</string>
<string>BA65FFF2-9E56-4E88-AB2E-8FBE2B3D030F</string>
@ -144,28 +143,6 @@
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSToolbarItem" id="481733947">
<object class="NSMutableString" key="NSToolbarItemIdentifier">
<characters key="NS.bytes">3E17CA47-6688-44FC-963C-CF22D780305F</characters>
</object>
<string key="NSToolbarItemLabel">Start Scanning</string>
<string key="NSToolbarItemPaletteLabel">Start Scanning</string>
<string key="NSToolbarItemToolTip"/>
<nil key="NSToolbarItemView"/>
<object class="NSCustomResource" key="NSToolbarItemImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">NSApplicationIcon</string>
</object>
<nil key="NSToolbarItemTarget"/>
<nil key="NSToolbarItemAction"/>
<string key="NSToolbarItemMinSize">{0, 0}</string>
<string key="NSToolbarItemMaxSize">{0, 0}</string>
<bool key="NSToolbarItemEnabled">YES</bool>
<bool key="NSToolbarItemAutovalidates">YES</bool>
<int key="NSToolbarItemTag">-1</int>
<bool key="NSToolbarIsUserRemovable">YES</bool>
<int key="NSToolbarItemVisibilityPriority">0</int>
</object>
<object class="NSToolbarItem" id="234109357">
<object class="NSMutableString" key="NSToolbarItemIdentifier">
<characters key="NS.bytes">4BD1D94E-8A70-48E1-AF8A-CEDC80CD0A5E</characters>
@ -174,11 +151,9 @@
<string key="NSToolbarItemPaletteLabel">Options</string>
<nil key="NSToolbarItemToolTip"/>
<object class="NSSegmentedControl" key="NSToolbarItemView" id="452019408">
<reference key="NSNextResponder"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{0, 14}, {195, 23}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSSegmentedCell" key="NSCell" id="993391476">
<int key="NSCellFlags">67239424</int>
@ -232,11 +207,9 @@
<string key="NSToolbarItemPaletteLabel">Filter</string>
<nil key="NSToolbarItemToolTip"/>
<object class="NSSearchField" key="NSToolbarItemView" id="363479146">
<reference key="NSNextResponder"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">258</int>
<string key="NSFrame">{{0, 14}, {81, 22}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSSearchFieldCell" key="NSCell" id="830851754">
<int key="NSCellFlags">343014976</int>
@ -356,11 +329,9 @@
<string key="NSToolbarItemPaletteLabel">Action</string>
<nil key="NSToolbarItemToolTip"/>
<object class="NSPopUpButton" key="NSToolbarItemView" id="1050768959">
<reference key="NSNextResponder"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{1, 14}, {40, 25}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="302095930">
<int key="NSCellFlags">-2076049856</int>
@ -646,7 +617,6 @@
<reference ref="282019906"/>
<reference ref="613476052"/>
<reference ref="501140424"/>
<reference ref="481733947"/>
<reference ref="272445295"/>
<reference ref="77112286"/>
<reference ref="695856706"/>
@ -654,10 +624,9 @@
</object>
<object class="NSMutableArray" key="NSToolbarIBDefaultItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="481733947"/>
<reference ref="77112286"/>
<reference ref="272445295"/>
<reference ref="234109357"/>
<reference ref="272445295"/>
<reference ref="501140424"/>
<reference ref="695856706"/>
</object>
@ -921,14 +890,6 @@
</object>
<int key="connectionID">46</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">startDuplicateScan:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="481733947"/>
</object>
<int key="connectionID">47</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">toggleDirectories:</string>
@ -1177,7 +1138,6 @@
<reference ref="695856706"/>
<reference ref="77112286"/>
<reference ref="272445295"/>
<reference ref="481733947"/>
<reference ref="501140424"/>
<reference ref="613476052"/>
<reference ref="282019906"/>
@ -1305,11 +1265,6 @@
<reference key="object" ref="272445295"/>
<reference key="parent" ref="983262794"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">20</int>
<reference key="object" ref="481733947"/>
<reference key="parent" ref="983262794"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">21</int>
<reference key="object" ref="501140424"/>
@ -1539,7 +1494,6 @@
<string>19.IBPluginDependency</string>
<string>2.IBEditorWindowLastContentRect</string>
<string>2.IBPluginDependency</string>
<string>20.IBPluginDependency</string>
<string>24.IBPluginDependency</string>
<string>24.ImportedFromIB2</string>
<string>25.IBPluginDependency</string>
@ -1615,7 +1569,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{324, 305}, {557, 400}}</string>
<boolean value="YES"/>
<boolean value="YES"/>
<boolean value="NO"/>
<boolean value="YES"/>
<string>{340, 340}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@ -1630,7 +1584,6 @@
<string>{{294, 705}, {617, 0}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{310, 310}, {353, 263}}</string>
@ -1731,6 +1684,7 @@
<string>openWebsite:</string>
<string>showAboutBox:</string>
<string>showPreferencesPanel:</string>
<string>startScanning:</string>
<string>toggleDirectories:</string>
</object>
<object class="NSMutableArray" key="dict.values">
@ -1740,6 +1694,7 @@
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
@ -1750,6 +1705,7 @@
<string>openWebsite:</string>
<string>showAboutBox:</string>
<string>showPreferencesPanel:</string>
<string>startScanning:</string>
<string>toggleDirectories:</string>
</object>
<object class="NSMutableArray" key="dict.values">
@ -1770,6 +1726,10 @@
<string key="name">showPreferencesPanel:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">startScanning:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">toggleDirectories:</string>
<string key="candidateClassName">id</string>
@ -1878,35 +1838,14 @@
<string key="className">ResultWindow</string>
<string key="superclassName">ResultWindowBase</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>resetColumnsToDefault:</string>
<string>startDuplicateScan:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
</object>
<string key="NS.key.0">removeDeadTracks:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>resetColumnsToDefault:</string>
<string>startDuplicateScan:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">resetColumnsToDefault:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">startDuplicateScan:</string>
<string key="candidateClassName">id</string>
</object>
<string key="NS.key.0">removeDeadTracks:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">removeDeadTracks:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@ -2782,7 +2721,6 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSActionTemplate</string>
<string>NSApplicationIcon</string>
<string>NSMenuCheckmark</string>
<string>NSMenuMixedState</string>
<string>NSSwitch</string>
@ -2791,7 +2729,6 @@
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{15, 15}</string>
<string>{128, 128}</string>
<string>{9, 8}</string>
<string>{7, 2}</string>
<string>{15, 15}</string>

View File

@ -11,6 +11,5 @@ http://www.hardcoded.net/licenses/bsd_license
@interface ResultWindow : ResultWindowBase {}
- (IBAction)clearPictureCache:(id)sender;
- (IBAction)startDuplicateScan:(id)sender;
- (IBAction)toggleDirectories:(id)sender;
@end

View File

@ -15,5 +15,4 @@ http://www.hardcoded.net/licenses/bsd_license
NSString *_lastAction;
}
- (IBAction)resetColumnsToDefault:(id)sender;
- (IBAction)startDuplicateScan:(id)sender;
@end