mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-23 07:01:39 +00:00
Initial commit.
--HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%402
This commit is contained in:
22
me/cocoa/AppDelegate.h
Normal file
22
me/cocoa/AppDelegate.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "dgbase/AppDelegate.h"
|
||||
#import "ResultWindow.h"
|
||||
#import "DirectoryPanel.h"
|
||||
#import "PyDupeGuru.h"
|
||||
|
||||
@interface AppDelegate : AppDelegateBase
|
||||
{
|
||||
IBOutlet NSButton *presetsButton;
|
||||
IBOutlet NSPopUpButton *presetsPopup;
|
||||
IBOutlet ResultWindow *result;
|
||||
|
||||
DirectoryPanel *_directoryPanel;
|
||||
}
|
||||
- (IBAction)openWebsite:(id)sender;
|
||||
- (IBAction)popupPresets:(id)sender;
|
||||
- (IBAction)toggleDirectories:(id)sender;
|
||||
- (IBAction)usePreset:(id)sender;
|
||||
|
||||
- (DirectoryPanel *)directoryPanel;
|
||||
- (PyDupeGuru *)py;
|
||||
@end
|
||||
158
me/cocoa/AppDelegate.m
Normal file
158
me/cocoa/AppDelegate.m
Normal file
@@ -0,0 +1,158 @@
|
||||
#import "AppDelegate.h"
|
||||
#import "cocoalib/ProgressController.h"
|
||||
#import "cocoalib/RegistrationInterface.h"
|
||||
#import "cocoalib/Utils.h"
|
||||
#import "cocoalib/ValueTransformers.h"
|
||||
#import "cocoalib/Dialogs.h"
|
||||
#import "Consts.h"
|
||||
|
||||
@implementation AppDelegate
|
||||
+ (void)initialize
|
||||
{
|
||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||
NSMutableDictionary *d = [NSMutableDictionary dictionaryWithCapacity:10];
|
||||
[d setObject:i2n(3) forKey:@"scanType"];
|
||||
[d setObject:i2n(80) forKey:@"minMatchPercentage"];
|
||||
[d setObject:i2n(1) forKey:@"recreatePathType"];
|
||||
[d setObject:b2n(NO) forKey:@"wordWeighting"];
|
||||
[d setObject:b2n(NO) forKey:@"matchSimilarWords"];
|
||||
[d setObject:b2n(YES) forKey:@"mixFileKind"];
|
||||
[d setObject:b2n(NO) forKey:@"useRegexpFilter"];
|
||||
[d setObject:b2n(NO) forKey:@"removeEmptyFolders"];
|
||||
[d setObject:b2n(NO) forKey:@"debug"];
|
||||
[d setObject:b2n(NO) forKey:@"scanTagTrack"];
|
||||
[d setObject:b2n(YES) forKey:@"scanTagArtist"];
|
||||
[d setObject:b2n(YES) forKey:@"scanTagAlbum"];
|
||||
[d setObject:b2n(YES) forKey:@"scanTagTitle"];
|
||||
[d setObject:b2n(NO) forKey:@"scanTagGenre"];
|
||||
[d setObject:b2n(NO) forKey:@"scanTagYear"];
|
||||
[d setObject:[NSArray array] forKey:@"recentDirectories"];
|
||||
[d setObject:[NSArray array] forKey:@"columnsOrder"];
|
||||
[d setObject:[NSDictionary dictionary] forKey:@"columnsWidth"];
|
||||
[[NSUserDefaultsController sharedUserDefaultsController] setInitialValues:d];
|
||||
[ud registerDefaults:d];
|
||||
}
|
||||
|
||||
- (id)init
|
||||
{
|
||||
self = [super init];
|
||||
NSMutableIndexSet *i = [NSMutableIndexSet indexSetWithIndex:4];
|
||||
[i addIndex:5];
|
||||
VTIsIntIn *vtScanTypeIsNotContent = [[[VTIsIntIn alloc] initWithValues:i reverse:YES] autorelease];
|
||||
[NSValueTransformer setValueTransformer:vtScanTypeIsNotContent forName:@"vtScanTypeIsNotContent"];
|
||||
VTIsIntIn *vtScanTypeIsTag = [[[VTIsIntIn alloc] initWithValues:[NSIndexSet indexSetWithIndex:3] reverse:NO] autorelease];
|
||||
[NSValueTransformer setValueTransformer:vtScanTypeIsTag forName:@"vtScanTypeIsTag"];
|
||||
_directoryPanel = nil;
|
||||
_appName = APPNAME;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (IBAction)openWebsite:(id)sender
|
||||
{
|
||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.hardcoded.net/dupeguru_me"]];
|
||||
}
|
||||
|
||||
- (IBAction)popupPresets:(id)sender
|
||||
{
|
||||
[presetsPopup selectItem: nil];
|
||||
[[presetsPopup cell] performClickWithFrame:[sender frame] inView:[sender superview]];
|
||||
}
|
||||
|
||||
- (IBAction)toggleDirectories:(id)sender
|
||||
{
|
||||
[[self directoryPanel] toggleVisible:sender];
|
||||
}
|
||||
|
||||
- (IBAction)usePreset:(id)sender
|
||||
{
|
||||
NSUserDefaultsController *ud = [NSUserDefaultsController sharedUserDefaultsController];
|
||||
[ud revertToInitialValues:nil];
|
||||
NSUserDefaults *d = [ud defaults];
|
||||
switch ([sender tag])
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
[d setInteger:5 forKey:@"scanType"];
|
||||
break;
|
||||
}
|
||||
//case 1 is defaults
|
||||
case 2:
|
||||
{
|
||||
[d setInteger:2 forKey:@"scanType"];
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
[d setInteger:0 forKey:@"scanType"];
|
||||
[d setInteger:50 forKey:@"minMatchPercentage"];
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
[d setInteger:0 forKey:@"scanType"];
|
||||
[d setInteger:50 forKey:@"minMatchPercentage"];
|
||||
[d setBool:YES forKey:@"matchSimilarWords"];
|
||||
[d setBool:YES forKey:@"wordWeighting"];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (DirectoryPanel *)directoryPanel
|
||||
{
|
||||
if (!_directoryPanel)
|
||||
_directoryPanel = [[DirectoryPanel alloc] initWithParentApp:self];
|
||||
return _directoryPanel;
|
||||
}
|
||||
- (PyDupeGuru *)py { return (PyDupeGuru *)py; }
|
||||
|
||||
//Delegate
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
|
||||
{
|
||||
[[ProgressController mainProgressController] setWorker:py];
|
||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||
//Restore Columns
|
||||
NSArray *columnsOrder = [ud arrayForKey:@"columnsOrder"];
|
||||
NSDictionary *columnsWidth = [ud dictionaryForKey:@"columnsWidth"];
|
||||
if ([columnsOrder count])
|
||||
[result restoreColumnsPosition:columnsOrder widths:columnsWidth];
|
||||
//Reg stuff
|
||||
if ([RegistrationInterface showNagWithApp:[self py] name:APPNAME limitDescription:LIMIT_DESC])
|
||||
[unlockMenuItem setTitle:@"Thanks for buying dupeGuru ME!"];
|
||||
//Restore results
|
||||
[py loadIgnoreList];
|
||||
[py loadResults];
|
||||
}
|
||||
|
||||
- (void)applicationWillBecomeActive:(NSNotification *)aNotification
|
||||
{
|
||||
if (![[result window] isVisible])
|
||||
[result showWindow:NSApp];
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification *)aNotification
|
||||
{
|
||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||
[ud setObject: [result getColumnsOrder] forKey:@"columnsOrder"];
|
||||
[ud setObject: [result getColumnsWidth] forKey:@"columnsWidth"];
|
||||
[py saveIgnoreList];
|
||||
[py saveResults];
|
||||
int sc = [ud integerForKey:@"sessionCountSinceLastIgnorePurge"];
|
||||
if (sc >= 10)
|
||||
{
|
||||
sc = -1;
|
||||
[py purgeIgnoreList];
|
||||
}
|
||||
sc++;
|
||||
[ud setInteger:sc forKey:@"sessionCountSinceLastIgnorePurge"];
|
||||
// NSApplication does not release nib instances objects, we must do it manually
|
||||
// Well, it isn't needed because the memory is freed anyway (we are quitting the application
|
||||
// But I need to release RecentDirectories so it saves the user defaults
|
||||
[recentDirectories release];
|
||||
}
|
||||
|
||||
- (void)recentDirecoryClicked:(NSString *)directory
|
||||
{
|
||||
[[self directoryPanel] addDirectory:directory];
|
||||
}
|
||||
@end
|
||||
5
me/cocoa/Consts.h
Normal file
5
me/cocoa/Consts.h
Normal file
@@ -0,0 +1,5 @@
|
||||
#import "dgbase/Consts.h"
|
||||
|
||||
#define APPNAME @"dupeGuru ME"
|
||||
|
||||
#define jobScanDeadTracks @"jobScanDeadTracks"
|
||||
13
me/cocoa/DetailsPanel.h
Normal file
13
me/cocoa/DetailsPanel.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "cocoalib/PyApp.h"
|
||||
#import "cocoalib/Table.h"
|
||||
|
||||
|
||||
@interface DetailsPanel : NSWindowController
|
||||
{
|
||||
IBOutlet TableView *detailsTable;
|
||||
}
|
||||
- (id)initWithPy:(PyApp *)aPy;
|
||||
|
||||
- (void)refresh;
|
||||
@end
|
||||
16
me/cocoa/DetailsPanel.m
Normal file
16
me/cocoa/DetailsPanel.m
Normal file
@@ -0,0 +1,16 @@
|
||||
#import "DetailsPanel.h"
|
||||
|
||||
@implementation DetailsPanel
|
||||
- (id)initWithPy:(PyApp *)aPy
|
||||
{
|
||||
self = [super initWithWindowNibName:@"Details"];
|
||||
[self window]; //So the detailsTable is initialized.
|
||||
[detailsTable setPy:aPy];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)refresh
|
||||
{
|
||||
[detailsTable reloadData];
|
||||
}
|
||||
@end
|
||||
8
me/cocoa/DirectoryPanel.h
Normal file
8
me/cocoa/DirectoryPanel.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "dgbase/DirectoryPanel.h"
|
||||
|
||||
@interface DirectoryPanel : DirectoryPanelBase
|
||||
{
|
||||
}
|
||||
- (IBAction)addiTunes:(id)sender;
|
||||
@end
|
||||
23
me/cocoa/DirectoryPanel.m
Normal file
23
me/cocoa/DirectoryPanel.m
Normal file
@@ -0,0 +1,23 @@
|
||||
#import "DirectoryPanel.h"
|
||||
|
||||
@implementation DirectoryPanel
|
||||
- (IBAction)addiTunes:(id)sender
|
||||
{
|
||||
[self addDirectory:[@"~/Music/iTunes/iTunes Music" stringByExpandingTildeInPath]];
|
||||
}
|
||||
|
||||
- (IBAction)popupAddDirectoryMenu:(id)sender
|
||||
{
|
||||
NSMenu *m = [addButtonPopUp menu];
|
||||
while ([m numberOfItems] > 0)
|
||||
[m removeItemAtIndex:0];
|
||||
NSMenuItem *mi = [m addItemWithTitle:@"Add New Directory..." action:@selector(askForDirectory:) keyEquivalent:@""];
|
||||
[mi setTarget:self];
|
||||
mi = [m addItemWithTitle:@"Add iTunes Directory" action:@selector(addiTunes:) keyEquivalent:@""];
|
||||
[mi setTarget:self];
|
||||
[m addItem:[NSMenuItem separatorItem]];
|
||||
[_recentDirectories fillMenu:m];
|
||||
[addButtonPopUp selectItem: nil];
|
||||
[[addButtonPopUp cell] performClickWithFrame:[sender frame] inView:[sender superview]];
|
||||
}
|
||||
@end
|
||||
18
me/cocoa/English.lproj/Details.nib/classes.nib
generated
Normal file
18
me/cocoa/English.lproj/Details.nib/classes.nib
generated
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
IBClasses = (
|
||||
{
|
||||
CLASS = DetailsPanel;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {detailsTable = NSTableView; };
|
||||
SUPERCLASS = NSWindowController;
|
||||
},
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
CLASS = TableView;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {py = PyApp; };
|
||||
SUPERCLASS = NSTableView;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
||||
16
me/cocoa/English.lproj/Details.nib/info.nib
generated
Normal file
16
me/cocoa/English.lproj/Details.nib/info.nib
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>432 54 356 240 0 0 1024 746 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>443.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8I127</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
me/cocoa/English.lproj/Details.nib/keyedobjects.nib
generated
Normal file
BIN
me/cocoa/English.lproj/Details.nib/keyedobjects.nib
generated
Normal file
Binary file not shown.
64
me/cocoa/English.lproj/Directories.nib/classes.nib
generated
Normal file
64
me/cocoa/English.lproj/Directories.nib/classes.nib
generated
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBClasses</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>FirstResponder</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>addiTunes</key>
|
||||
<string>id</string>
|
||||
<key>askForDirectory</key>
|
||||
<string>id</string>
|
||||
<key>changeDirectoryState</key>
|
||||
<string>id</string>
|
||||
<key>popupAddDirectoryMenu</key>
|
||||
<string>id</string>
|
||||
<key>removeSelectedDirectory</key>
|
||||
<string>id</string>
|
||||
<key>toggleVisible</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>DirectoryPanel</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>addButtonPopUp</key>
|
||||
<string>NSPopUpButton</string>
|
||||
<key>directories</key>
|
||||
<string>NSOutlineView</string>
|
||||
<key>removeButton</key>
|
||||
<string>NSButton</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>DirectoryPanelBase</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>OutlineView</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>py</key>
|
||||
<string>PyApp</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSOutlineView</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>IBVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
20
me/cocoa/English.lproj/Directories.nib/info.nib
generated
Normal file
20
me/cocoa/English.lproj/Directories.nib/info.nib
generated
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>629</string>
|
||||
<key>IBLastKnownRelativeProjectPath</key>
|
||||
<string>../../dupeguru.xcodeproj</string>
|
||||
<key>IBOldestOS</key>
|
||||
<integer>5</integer>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>9B18</string>
|
||||
<key>targetFramework</key>
|
||||
<string>IBCocoaFramework</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
me/cocoa/English.lproj/Directories.nib/keyedobjects.nib
generated
Normal file
BIN
me/cocoa/English.lproj/Directories.nib/keyedobjects.nib
generated
Normal file
Binary file not shown.
BIN
me/cocoa/English.lproj/InfoPlist.strings
Normal file
BIN
me/cocoa/English.lproj/InfoPlist.strings
Normal file
Binary file not shown.
257
me/cocoa/English.lproj/MainMenu.nib/classes.nib
generated
Normal file
257
me/cocoa/English.lproj/MainMenu.nib/classes.nib
generated
Normal file
@@ -0,0 +1,257 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBClasses</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>NSSegmentedControl</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSControl</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>openWebsite</key>
|
||||
<string>id</string>
|
||||
<key>popupPresets</key>
|
||||
<string>id</string>
|
||||
<key>toggleDirectories</key>
|
||||
<string>id</string>
|
||||
<key>unlockApp</key>
|
||||
<string>id</string>
|
||||
<key>usePreset</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>AppDelegate</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>defaultsController</key>
|
||||
<string>NSUserDefaultsController</string>
|
||||
<key>presetsButton</key>
|
||||
<string>NSButton</string>
|
||||
<key>presetsPopup</key>
|
||||
<string>NSPopUpButton</string>
|
||||
<key>py</key>
|
||||
<string>PyDupeGuru</string>
|
||||
<key>recentDirectories</key>
|
||||
<string>RecentDirectories</string>
|
||||
<key>result</key>
|
||||
<string>ResultWindow</string>
|
||||
<key>unlockMenuItem</key>
|
||||
<string>NSMenuItem</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>AppDelegateBase</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>PyApp</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>MatchesView</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>OutlineView</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>PyDupeGuruBase</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>PyApp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>PyDupeGuru</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>PyDupeGuruBase</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>changeDelta</key>
|
||||
<string>id</string>
|
||||
<key>changePowerMarker</key>
|
||||
<string>id</string>
|
||||
<key>clearIgnoreList</key>
|
||||
<string>id</string>
|
||||
<key>collapseAll</key>
|
||||
<string>id</string>
|
||||
<key>copyMarked</key>
|
||||
<string>id</string>
|
||||
<key>deleteMarked</key>
|
||||
<string>id</string>
|
||||
<key>expandAll</key>
|
||||
<string>id</string>
|
||||
<key>exportToXHTML</key>
|
||||
<string>id</string>
|
||||
<key>filter</key>
|
||||
<string>id</string>
|
||||
<key>ignoreSelected</key>
|
||||
<string>id</string>
|
||||
<key>markAll</key>
|
||||
<string>id</string>
|
||||
<key>markInvert</key>
|
||||
<string>id</string>
|
||||
<key>markNone</key>
|
||||
<string>id</string>
|
||||
<key>markSelected</key>
|
||||
<string>id</string>
|
||||
<key>markToggle</key>
|
||||
<string>id</string>
|
||||
<key>moveMarked</key>
|
||||
<string>id</string>
|
||||
<key>openSelected</key>
|
||||
<string>id</string>
|
||||
<key>refresh</key>
|
||||
<string>id</string>
|
||||
<key>removeDeadTracks</key>
|
||||
<string>id</string>
|
||||
<key>removeMarked</key>
|
||||
<string>id</string>
|
||||
<key>removeSelected</key>
|
||||
<string>id</string>
|
||||
<key>renameSelected</key>
|
||||
<string>id</string>
|
||||
<key>resetColumnsToDefault</key>
|
||||
<string>id</string>
|
||||
<key>revealSelected</key>
|
||||
<string>id</string>
|
||||
<key>showPreferencesPanel</key>
|
||||
<string>id</string>
|
||||
<key>startDuplicateScan</key>
|
||||
<string>id</string>
|
||||
<key>switchSelected</key>
|
||||
<string>id</string>
|
||||
<key>toggleColumn</key>
|
||||
<string>id</string>
|
||||
<key>toggleDelta</key>
|
||||
<string>id</string>
|
||||
<key>toggleDetailsPanel</key>
|
||||
<string>id</string>
|
||||
<key>togglePowerMarker</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>ResultWindow</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>actionMenu</key>
|
||||
<string>NSPopUpButton</string>
|
||||
<key>actionMenuView</key>
|
||||
<string>NSView</string>
|
||||
<key>app</key>
|
||||
<string>id</string>
|
||||
<key>columnsMenu</key>
|
||||
<string>NSMenu</string>
|
||||
<key>deltaSwitch</key>
|
||||
<string>NSSegmentedControl</string>
|
||||
<key>deltaSwitchView</key>
|
||||
<string>NSView</string>
|
||||
<key>filterField</key>
|
||||
<string>NSSearchField</string>
|
||||
<key>filterFieldView</key>
|
||||
<string>NSView</string>
|
||||
<key>matches</key>
|
||||
<string>MatchesView</string>
|
||||
<key>pmSwitch</key>
|
||||
<string>NSSegmentedControl</string>
|
||||
<key>pmSwitchView</key>
|
||||
<string>NSView</string>
|
||||
<key>preferencesPanel</key>
|
||||
<string>NSWindow</string>
|
||||
<key>py</key>
|
||||
<string>PyDupeGuru</string>
|
||||
<key>stats</key>
|
||||
<string>NSTextField</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>ResultWindowBase</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>FirstResponder</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>checkForUpdates</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>SUUpdater</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>clearMenu</key>
|
||||
<string>id</string>
|
||||
<key>menuClick</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>RecentDirectories</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>delegate</key>
|
||||
<string>id</string>
|
||||
<key>menu</key>
|
||||
<string>NSMenu</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>ResultWindowBase</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSWindowController</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>OutlineView</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>py</key>
|
||||
<string>PyApp</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSOutlineView</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>IBVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
20
me/cocoa/English.lproj/MainMenu.nib/info.nib
generated
Normal file
20
me/cocoa/English.lproj/MainMenu.nib/info.nib
generated
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>629</string>
|
||||
<key>IBLastKnownRelativeProjectPath</key>
|
||||
<string>../../dupeguru.xcodeproj</string>
|
||||
<key>IBOldestOS</key>
|
||||
<integer>5</integer>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>598</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>9E17</string>
|
||||
<key>targetFramework</key>
|
||||
<string>IBCocoaFramework</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
me/cocoa/English.lproj/MainMenu.nib/keyedobjects.nib
generated
Normal file
BIN
me/cocoa/English.lproj/MainMenu.nib/keyedobjects.nib
generated
Normal file
Binary file not shown.
34
me/cocoa/Info.plist
Normal file
34
me/cocoa/Info.plist
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleHelpBookFolder</key>
|
||||
<string>dupeguru_me_help</string>
|
||||
<key>CFBundleHelpBookName</key>
|
||||
<string>dupeGuru ME Help</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>dupeguru</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.hardcoded_software.dupeguru_me</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>hsft</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>5.6.1</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>SUFeedURL</key>
|
||||
<string>http://www.hardcoded.net/updates/dupeguru_me.appcast</string>
|
||||
</dict>
|
||||
</plist>
|
||||
15
me/cocoa/PyDupeGuru.h
Normal file
15
me/cocoa/PyDupeGuru.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "dgbase/PyDupeGuru.h"
|
||||
|
||||
@interface PyDupeGuru : PyDupeGuruBase
|
||||
//Scanning options
|
||||
- (void)setScanType:(NSNumber *)scan_type;
|
||||
- (void)setMinWordCount:(NSNumber *)word_count;
|
||||
- (void)setMinWordLength:(NSNumber *)word_length;
|
||||
- (void)setWordWeighting:(NSNumber *)words_are_weighted;
|
||||
- (void)setMatchSimilarWords:(NSNumber *)match_similar_words;
|
||||
- (void)enable:(NSNumber *)enable scanForTag:(NSString *)tag;
|
||||
- (void)scanDeadTracks;
|
||||
- (void)removeDeadTracks;
|
||||
- (int)deadTrackCount;
|
||||
@end
|
||||
56
me/cocoa/ResultWindow.h
Normal file
56
me/cocoa/ResultWindow.h
Normal file
@@ -0,0 +1,56 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "cocoalib/Outline.h"
|
||||
#import "dgbase/ResultWindow.h"
|
||||
#import "DetailsPanel.h"
|
||||
#import "DirectoryPanel.h"
|
||||
|
||||
@interface ResultWindow : ResultWindowBase
|
||||
{
|
||||
IBOutlet NSPopUpButton *actionMenu;
|
||||
IBOutlet NSMenu *columnsMenu;
|
||||
IBOutlet NSSearchField *filterField;
|
||||
IBOutlet NSSegmentedControl *pmSwitch;
|
||||
IBOutlet NSWindow *preferencesPanel;
|
||||
IBOutlet NSTextField *stats;
|
||||
|
||||
NSString *_lastAction;
|
||||
DetailsPanel *_detailsPanel;
|
||||
NSMutableArray *_resultColumns;
|
||||
NSMutableIndexSet *_deltaColumns;
|
||||
}
|
||||
- (IBAction)changePowerMarker:(id)sender;
|
||||
- (IBAction)clearIgnoreList:(id)sender;
|
||||
- (IBAction)exportToXHTML:(id)sender;
|
||||
- (IBAction)filter:(id)sender;
|
||||
- (IBAction)ignoreSelected:(id)sender;
|
||||
- (IBAction)markAll:(id)sender;
|
||||
- (IBAction)markInvert:(id)sender;
|
||||
- (IBAction)markNone:(id)sender;
|
||||
- (IBAction)markSelected:(id)sender;
|
||||
- (IBAction)markToggle:(id)sender;
|
||||
- (IBAction)openSelected:(id)sender;
|
||||
- (IBAction)refresh:(id)sender;
|
||||
- (IBAction)removeDeadTracks:(id)sender;
|
||||
- (IBAction)removeMarked:(id)sender;
|
||||
- (IBAction)removeSelected:(id)sender;
|
||||
- (IBAction)renameSelected:(id)sender;
|
||||
- (IBAction)resetColumnsToDefault:(id)sender;
|
||||
- (IBAction)revealSelected:(id)sender;
|
||||
- (IBAction)showPreferencesPanel:(id)sender;
|
||||
- (IBAction)startDuplicateScan:(id)sender;
|
||||
- (IBAction)switchSelected:(id)sender;
|
||||
- (IBAction)toggleColumn:(id)sender;
|
||||
- (IBAction)toggleDelta:(id)sender;
|
||||
- (IBAction)toggleDetailsPanel:(id)sender;
|
||||
- (IBAction)togglePowerMarker:(id)sender;
|
||||
|
||||
- (NSTableColumn *)getColumnForIdentifier:(int)aIdentifier title:(NSString *)aTitle width:(int)aWidth refCol:(NSTableColumn *)aColumn;
|
||||
- (NSArray *)getColumnsOrder;
|
||||
- (NSDictionary *)getColumnsWidth;
|
||||
- (NSArray *)getSelected:(BOOL)aDupesOnly;
|
||||
- (NSArray *)getSelectedPaths:(BOOL)aDupesOnly;
|
||||
- (void)initResultColumns;
|
||||
- (void)performPySelection:(NSArray *)aIndexPaths;
|
||||
- (void)refreshStats;
|
||||
- (void)restoreColumnsPosition:(NSArray *)aColumnsOrder widths:(NSDictionary *)aColumnsWidth;
|
||||
@end
|
||||
505
me/cocoa/ResultWindow.m
Normal file
505
me/cocoa/ResultWindow.m
Normal file
@@ -0,0 +1,505 @@
|
||||
#import "ResultWindow.h"
|
||||
#import "cocoalib/Dialogs.h"
|
||||
#import "cocoalib/ProgressController.h"
|
||||
#import "cocoalib/RegistrationInterface.h"
|
||||
#import "cocoalib/Utils.h"
|
||||
#import "AppDelegate.h"
|
||||
#import "Consts.h"
|
||||
|
||||
@implementation ResultWindow
|
||||
/* Override */
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
_detailsPanel = nil;
|
||||
_displayDelta = NO;
|
||||
_powerMode = NO;
|
||||
_deltaColumns = [[NSMutableIndexSet indexSetWithIndexesInRange:NSMakeRange(2,7)] retain];
|
||||
[_deltaColumns removeIndex:6];
|
||||
[deltaSwitch setSelectedSegment:0];
|
||||
[pmSwitch setSelectedSegment:0];
|
||||
[py setDisplayDeltaValues:b2n(_displayDelta)];
|
||||
[matches setTarget:self];
|
||||
[matches setDoubleAction:@selector(openSelected:)];
|
||||
[[actionMenu itemAtIndex:0] setImage:[NSImage imageNamed: @"gear"]];
|
||||
[self initResultColumns];
|
||||
[self refreshStats];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(resultsMarkingChanged:) name:ResultsMarkingChangedNotification object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(duplicateSelectionChanged:) name:DuplicateSelectionChangedNotification object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(resultsChanged:) name:ResultsChangedNotification object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jobCompleted:) name:JobCompletedNotification object:nil];
|
||||
|
||||
NSToolbar *t = [[[NSToolbar alloc] initWithIdentifier:@"ResultWindowToolbar"] autorelease];
|
||||
[t setAllowsUserCustomization:YES];
|
||||
[t setAutosavesConfiguration:YES];
|
||||
[t setDisplayMode:NSToolbarDisplayModeIconAndLabel];
|
||||
[t setDelegate:self];
|
||||
[[self window] setToolbar:t];
|
||||
}
|
||||
|
||||
/* Overrides */
|
||||
- (NSString *)logoImageName
|
||||
{
|
||||
return @"dgme_logo32";
|
||||
}
|
||||
|
||||
/* Actions */
|
||||
|
||||
- (IBAction)changePowerMarker:(id)sender
|
||||
{
|
||||
_powerMode = [pmSwitch selectedSegment] == 1;
|
||||
if (_powerMode)
|
||||
[matches setTag:2];
|
||||
else
|
||||
[matches setTag:0];
|
||||
[self expandAll:nil];
|
||||
[self outlineView:matches didClickTableColumn:nil];
|
||||
}
|
||||
|
||||
- (IBAction)clearIgnoreList:(id)sender
|
||||
{
|
||||
int i = n2i([py getIgnoreListCount]);
|
||||
if (!i)
|
||||
return;
|
||||
if ([Dialogs askYesNo:[NSString stringWithFormat:@"Do you really want to remove all %d items from the ignore list?",i]] == NSAlertSecondButtonReturn) // NO
|
||||
return;
|
||||
[py clearIgnoreList];
|
||||
}
|
||||
|
||||
- (IBAction)exportToXHTML:(id)sender
|
||||
{
|
||||
NSString *xsltPath = [[NSBundle mainBundle] pathForResource:@"dg" ofType:@"xsl"];
|
||||
NSString *cssPath = [[NSBundle mainBundle] pathForResource:@"hardcoded" ofType:@"css"];
|
||||
NSString *exported = [py exportToXHTMLwithColumns:[self getColumnsOrder] xslt:xsltPath css:cssPath];
|
||||
[[NSWorkspace sharedWorkspace] openFile:exported];
|
||||
}
|
||||
|
||||
- (IBAction)filter:(id)sender
|
||||
{
|
||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||
[py setEscapeFilterRegexp:b2n(!n2b([ud objectForKey:@"useRegexpFilter"]))];
|
||||
[py applyFilter:[filterField stringValue]];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:ResultsChangedNotification object:self];
|
||||
}
|
||||
|
||||
- (IBAction)ignoreSelected:(id)sender
|
||||
{
|
||||
NSArray *nodeList = [self getSelected:YES];
|
||||
if (![nodeList count])
|
||||
return;
|
||||
if ([Dialogs askYesNo:[NSString stringWithFormat:@"All selected %d matches are going to be ignored in all subsequent scans. Continue?",[nodeList count]]] == NSAlertSecondButtonReturn) // NO
|
||||
return;
|
||||
[self performPySelection:[self getSelectedPaths:YES]];
|
||||
[py addSelectedToIgnoreList];
|
||||
[py removeSelected];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:ResultsChangedNotification object:self];
|
||||
}
|
||||
|
||||
- (IBAction)markAll:(id)sender
|
||||
{
|
||||
[py markAll];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:ResultsMarkingChangedNotification object:self];
|
||||
}
|
||||
|
||||
- (IBAction)markInvert:(id)sender
|
||||
{
|
||||
[py markInvert];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:ResultsMarkingChangedNotification object:self];
|
||||
}
|
||||
|
||||
- (IBAction)markNone:(id)sender
|
||||
{
|
||||
[py markNone];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:ResultsMarkingChangedNotification object:self];
|
||||
}
|
||||
|
||||
- (IBAction)markSelected:(id)sender
|
||||
{
|
||||
[self performPySelection:[self getSelectedPaths:YES]];
|
||||
[py toggleSelectedMark];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:ResultsMarkingChangedNotification object:self];
|
||||
}
|
||||
|
||||
- (IBAction)markToggle:(id)sender
|
||||
{
|
||||
OVNode *node = [matches itemAtRow:[matches clickedRow]];
|
||||
[self performPySelection:[NSArray arrayWithObject:p2a([node indexPath])]];
|
||||
[py toggleSelectedMark];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:ResultsMarkingChangedNotification object:self];
|
||||
}
|
||||
|
||||
- (IBAction)openSelected:(id)sender
|
||||
{
|
||||
[self performPySelection:[self getSelectedPaths:NO]];
|
||||
[py openSelected];
|
||||
}
|
||||
|
||||
- (IBAction)refresh:(id)sender
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:ResultsChangedNotification object:self];
|
||||
}
|
||||
|
||||
- (IBAction)removeDeadTracks:(id)sender
|
||||
{
|
||||
[(PyDupeGuru *)py scanDeadTracks];
|
||||
}
|
||||
|
||||
- (IBAction)removeMarked:(id)sender
|
||||
{
|
||||
int mark_count = [[py getMarkCount] intValue];
|
||||
if (!mark_count)
|
||||
return;
|
||||
if ([Dialogs askYesNo:[NSString stringWithFormat:@"You are about to remove %d files from results. Continue?",mark_count]] == NSAlertSecondButtonReturn) // NO
|
||||
return;
|
||||
[py removeMarked];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:ResultsChangedNotification object:self];
|
||||
}
|
||||
|
||||
- (IBAction)removeSelected:(id)sender
|
||||
{
|
||||
NSArray *nodeList = [self getSelected:YES];
|
||||
if (![nodeList count])
|
||||
return;
|
||||
if ([Dialogs askYesNo:[NSString stringWithFormat:@"You are about to remove %d files from results. Continue?",[nodeList count]]] == NSAlertSecondButtonReturn) // NO
|
||||
return;
|
||||
[self performPySelection:[self getSelectedPaths:YES]];
|
||||
[py removeSelected];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:ResultsChangedNotification object:self];
|
||||
}
|
||||
|
||||
- (IBAction)renameSelected:(id)sender
|
||||
{
|
||||
int col = [matches columnWithIdentifier:@"0"];
|
||||
int row = [matches selectedRow];
|
||||
[matches editColumn:col row:row withEvent:[NSApp currentEvent] select:YES];
|
||||
}
|
||||
|
||||
- (IBAction)resetColumnsToDefault:(id)sender
|
||||
{
|
||||
NSMutableArray *columnsOrder = [NSMutableArray array];
|
||||
[columnsOrder addObject:@"0"];
|
||||
[columnsOrder addObject:@"2"];
|
||||
[columnsOrder addObject:@"3"];
|
||||
[columnsOrder addObject:@"4"];
|
||||
[columnsOrder addObject:@"16"];
|
||||
NSMutableDictionary *columnsWidth = [NSMutableDictionary dictionary];
|
||||
[columnsWidth setObject:i2n(214) forKey:@"0"];
|
||||
[columnsWidth setObject:i2n(63) forKey:@"2"];
|
||||
[columnsWidth setObject:i2n(50) forKey:@"3"];
|
||||
[columnsWidth setObject:i2n(50) forKey:@"4"];
|
||||
[columnsWidth setObject:i2n(57) forKey:@"16"];
|
||||
[self restoreColumnsPosition:columnsOrder widths:columnsWidth];
|
||||
}
|
||||
|
||||
- (IBAction)revealSelected:(id)sender
|
||||
{
|
||||
[self performPySelection:[self getSelectedPaths:NO]];
|
||||
[py revealSelected];
|
||||
}
|
||||
|
||||
- (IBAction)showPreferencesPanel:(id)sender
|
||||
{
|
||||
[preferencesPanel makeKeyAndOrderFront:sender];
|
||||
}
|
||||
|
||||
- (IBAction)startDuplicateScan:(id)sender
|
||||
{
|
||||
if ([matches numberOfRows] > 0)
|
||||
{
|
||||
if ([Dialogs askYesNo:@"Are you sure you want to start a new duplicate scan?"] == NSAlertSecondButtonReturn) // NO
|
||||
return;
|
||||
}
|
||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||
PyDupeGuru *_py = (PyDupeGuru *)py;
|
||||
[_py setScanType:[ud objectForKey:@"scanType"]];
|
||||
[_py enable:[ud objectForKey:@"scanTagTrack"] scanForTag:@"track"];
|
||||
[_py enable:[ud objectForKey:@"scanTagArtist"] scanForTag:@"artist"];
|
||||
[_py enable:[ud objectForKey:@"scanTagAlbum"] scanForTag:@"album"];
|
||||
[_py enable:[ud objectForKey:@"scanTagTitle"] scanForTag:@"title"];
|
||||
[_py enable:[ud objectForKey:@"scanTagGenre"] scanForTag:@"genre"];
|
||||
[_py enable:[ud objectForKey:@"scanTagYear"] scanForTag:@"year"];
|
||||
[_py setMinMatchPercentage:[ud objectForKey:@"minMatchPercentage"]];
|
||||
[_py setWordWeighting:[ud objectForKey:@"wordWeighting"]];
|
||||
[_py setMixFileKind:[ud objectForKey:@"mixFileKind"]];
|
||||
[_py setMatchSimilarWords:[ud objectForKey:@"matchSimilarWords"]];
|
||||
int r = n2i([py doScan]);
|
||||
[matches reloadData];
|
||||
[self refreshStats];
|
||||
if (r == 1)
|
||||
[Dialogs showMessage:@"You cannot make a duplicate scan with only reference directories."];
|
||||
if (r == 3)
|
||||
{
|
||||
[Dialogs showMessage:@"The selected directories contain no scannable file."];
|
||||
[app toggleDirectories:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)switchSelected:(id)sender
|
||||
{
|
||||
[self performPySelection:[self getSelectedPaths:YES]];
|
||||
[py makeSelectedReference];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:ResultsChangedNotification object:self];
|
||||
}
|
||||
|
||||
- (IBAction)toggleColumn:(id)sender
|
||||
{
|
||||
NSMenuItem *mi = sender;
|
||||
NSString *colId = [NSString stringWithFormat:@"%d",[mi tag]];
|
||||
NSTableColumn *col = [matches tableColumnWithIdentifier:colId];
|
||||
if (col == nil)
|
||||
{
|
||||
//Add Column
|
||||
col = [_resultColumns objectAtIndex:[mi tag]];
|
||||
[matches addTableColumn:col];
|
||||
[mi setState:NSOnState];
|
||||
}
|
||||
else
|
||||
{
|
||||
//Remove column
|
||||
[matches removeTableColumn:col];
|
||||
[mi setState:NSOffState];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)toggleDelta:(id)sender
|
||||
{
|
||||
if ([deltaSwitch selectedSegment] == 1)
|
||||
[deltaSwitch setSelectedSegment:0];
|
||||
else
|
||||
[deltaSwitch setSelectedSegment:1];
|
||||
[self changeDelta:sender];
|
||||
}
|
||||
|
||||
- (IBAction)toggleDetailsPanel:(id)sender
|
||||
{
|
||||
if (!_detailsPanel)
|
||||
_detailsPanel = [[DetailsPanel alloc] initWithPy:py];
|
||||
if ([[_detailsPanel window] isVisible])
|
||||
[[_detailsPanel window] close];
|
||||
else
|
||||
[[_detailsPanel window] orderFront:nil];
|
||||
}
|
||||
|
||||
- (IBAction)togglePowerMarker:(id)sender
|
||||
{
|
||||
if ([pmSwitch selectedSegment] == 1)
|
||||
[pmSwitch setSelectedSegment:0];
|
||||
else
|
||||
[pmSwitch setSelectedSegment:1];
|
||||
[self changePowerMarker:sender];
|
||||
}
|
||||
|
||||
/* Public */
|
||||
- (NSTableColumn *)getColumnForIdentifier:(int)aIdentifier title:(NSString *)aTitle width:(int)aWidth refCol:(NSTableColumn *)aColumn
|
||||
{
|
||||
NSNumber *n = [NSNumber numberWithInt:aIdentifier];
|
||||
NSTableColumn *col = [[NSTableColumn alloc] initWithIdentifier:[n stringValue]];
|
||||
[col setWidth:aWidth];
|
||||
[col setEditable:NO];
|
||||
[[col dataCell] setFont:[[aColumn dataCell] font]];
|
||||
[[col headerCell] setStringValue:aTitle];
|
||||
[col setResizingMask:NSTableColumnUserResizingMask];
|
||||
[col setSortDescriptorPrototype:[[NSSortDescriptor alloc] initWithKey:[n stringValue] ascending:YES]];
|
||||
return col;
|
||||
}
|
||||
|
||||
//Returns an array of identifiers, in order.
|
||||
- (NSArray *)getColumnsOrder
|
||||
{
|
||||
NSTableColumn *col;
|
||||
NSString *colId;
|
||||
NSMutableArray *result = [NSMutableArray array];
|
||||
NSEnumerator *e = [[matches tableColumns] objectEnumerator];
|
||||
while (col = [e nextObject])
|
||||
{
|
||||
colId = [col identifier];
|
||||
[result addObject:colId];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSDictionary *)getColumnsWidth
|
||||
{
|
||||
NSMutableDictionary *result = [NSMutableDictionary dictionary];
|
||||
NSTableColumn *col;
|
||||
NSString *colId;
|
||||
NSNumber *width;
|
||||
NSEnumerator *e = [[matches tableColumns] objectEnumerator];
|
||||
while (col = [e nextObject])
|
||||
{
|
||||
colId = [col identifier];
|
||||
width = [NSNumber numberWithFloat:[col width]];
|
||||
[result setObject:width forKey:colId];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSArray *)getSelected:(BOOL)aDupesOnly
|
||||
{
|
||||
if (_powerMode)
|
||||
aDupesOnly = NO;
|
||||
NSIndexSet *indexes = [matches selectedRowIndexes];
|
||||
NSMutableArray *nodeList = [NSMutableArray array];
|
||||
OVNode *node;
|
||||
int i = [indexes firstIndex];
|
||||
while (i != NSNotFound)
|
||||
{
|
||||
node = [matches itemAtRow:i];
|
||||
if (!aDupesOnly || ([node level] > 1))
|
||||
[nodeList addObject:node];
|
||||
i = [indexes indexGreaterThanIndex:i];
|
||||
}
|
||||
return nodeList;
|
||||
}
|
||||
|
||||
- (NSArray *)getSelectedPaths:(BOOL)aDupesOnly
|
||||
{
|
||||
NSMutableArray *r = [NSMutableArray array];
|
||||
NSArray *selected = [self getSelected:aDupesOnly];
|
||||
NSEnumerator *e = [selected objectEnumerator];
|
||||
OVNode *node;
|
||||
while (node = [e nextObject])
|
||||
[r addObject:p2a([node indexPath])];
|
||||
return r;
|
||||
}
|
||||
|
||||
- (void)performPySelection:(NSArray *)aIndexPaths
|
||||
{
|
||||
if (_powerMode)
|
||||
[py selectPowerMarkerNodePaths:aIndexPaths];
|
||||
else
|
||||
[py selectResultNodePaths:aIndexPaths];
|
||||
}
|
||||
|
||||
- (void)initResultColumns
|
||||
{
|
||||
NSTableColumn *refCol = [matches tableColumnWithIdentifier:@"0"];
|
||||
_resultColumns = [[NSMutableArray alloc] init];
|
||||
[_resultColumns addObject:[matches tableColumnWithIdentifier:@"0"]]; // File Name
|
||||
[_resultColumns addObject:[self getColumnForIdentifier:1 title:@"Directory" width:120 refCol:refCol]];
|
||||
[_resultColumns addObject:[matches tableColumnWithIdentifier:@"2"]]; // Size
|
||||
[_resultColumns addObject:[matches tableColumnWithIdentifier:@"3"]]; // Time
|
||||
[_resultColumns addObject:[matches tableColumnWithIdentifier:@"4"]]; // Bitrate
|
||||
[_resultColumns addObject:[self getColumnForIdentifier:5 title:@"Sample Rate" width:60 refCol:refCol]];
|
||||
[_resultColumns addObject:[self getColumnForIdentifier:6 title:@"Kind" width:40 refCol:refCol]];
|
||||
[_resultColumns addObject:[self getColumnForIdentifier:7 title:@"Creation" width:120 refCol:refCol]];
|
||||
[_resultColumns addObject:[self getColumnForIdentifier:8 title:@"Modification" width:120 refCol:refCol]];
|
||||
[_resultColumns addObject:[self getColumnForIdentifier:9 title:@"Title" width:120 refCol:refCol]];
|
||||
[_resultColumns addObject:[self getColumnForIdentifier:10 title:@"Artist" width:120 refCol:refCol]];
|
||||
[_resultColumns addObject:[self getColumnForIdentifier:11 title:@"Album" width:120 refCol:refCol]];
|
||||
[_resultColumns addObject:[self getColumnForIdentifier:12 title:@"Genre" width:80 refCol:refCol]];
|
||||
[_resultColumns addObject:[self getColumnForIdentifier:13 title:@"Year" width:40 refCol:refCol]];
|
||||
[_resultColumns addObject:[self getColumnForIdentifier:14 title:@"Track Number" width:40 refCol:refCol]];
|
||||
[_resultColumns addObject:[self getColumnForIdentifier:15 title:@"Comment" width:120 refCol:refCol]];
|
||||
[_resultColumns addObject:[matches tableColumnWithIdentifier:@"16"]]; // Match %
|
||||
[_resultColumns addObject:[self getColumnForIdentifier:17 title:@"Words Used" width:120 refCol:refCol]];
|
||||
[_resultColumns addObject:[self getColumnForIdentifier:18 title:@"Dupe Count" width:80 refCol:refCol]];
|
||||
}
|
||||
|
||||
-(void)refreshStats
|
||||
{
|
||||
[stats setStringValue:[py getStatLine]];
|
||||
}
|
||||
|
||||
- (void)restoreColumnsPosition:(NSArray *)aColumnsOrder widths:(NSDictionary *)aColumnsWidth
|
||||
{
|
||||
NSTableColumn *col;
|
||||
NSString *colId;
|
||||
NSNumber *width;
|
||||
NSMenuItem *mi;
|
||||
//Remove all columns
|
||||
NSEnumerator *e = [[columnsMenu itemArray] objectEnumerator];
|
||||
while (mi = [e nextObject])
|
||||
{
|
||||
if ([mi state] == NSOnState)
|
||||
[self toggleColumn:mi];
|
||||
}
|
||||
//Add columns and set widths
|
||||
e = [aColumnsOrder objectEnumerator];
|
||||
while (colId = [e nextObject])
|
||||
{
|
||||
if (![colId isEqual:@"mark"])
|
||||
{
|
||||
col = [_resultColumns objectAtIndex:[colId intValue]];
|
||||
width = [aColumnsWidth objectForKey:[col identifier]];
|
||||
mi = [columnsMenu itemWithTag:[colId intValue]];
|
||||
if (width)
|
||||
[col setWidth:[width floatValue]];
|
||||
[self toggleColumn:mi];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Delegate */
|
||||
- (void)outlineView:(NSOutlineView *)outlineView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item
|
||||
{
|
||||
OVNode *node = item;
|
||||
if ([[tableColumn identifier] isEqual:@"mark"])
|
||||
{
|
||||
[cell setEnabled: [node isMarkable]];
|
||||
}
|
||||
if ([cell isKindOfClass:[NSTextFieldCell class]])
|
||||
{
|
||||
// Determine if the text color will be blue due to directory being reference.
|
||||
NSTextFieldCell *textCell = cell;
|
||||
if ([node isMarkable])
|
||||
[textCell setTextColor:[NSColor blackColor]];
|
||||
else
|
||||
[textCell setTextColor:[NSColor blueColor]];
|
||||
if ((_displayDelta) && (_powerMode || ([node level] > 1)))
|
||||
{
|
||||
int i = [[tableColumn identifier] intValue];
|
||||
if ([_deltaColumns containsIndex:i])
|
||||
[textCell setTextColor:[NSColor orangeColor]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Notifications */
|
||||
- (void)duplicateSelectionChanged:(NSNotification *)aNotification
|
||||
{
|
||||
if (_detailsPanel)
|
||||
[_detailsPanel refresh];
|
||||
}
|
||||
|
||||
- (void)jobCompleted:(NSNotification *)aNotification
|
||||
{
|
||||
[super jobCompleted:aNotification];
|
||||
id lastAction = [[ProgressController mainProgressController] jobId];
|
||||
if ([lastAction isEqualTo:jobScanDeadTracks])
|
||||
{
|
||||
int deadTrackCount = [(PyDupeGuru *)py deadTrackCount];
|
||||
if (deadTrackCount > 0)
|
||||
{
|
||||
NSString *msg = @"Your iTunes Library contains %d dead tracks ready to be removed. Continue?";
|
||||
if ([Dialogs askYesNo:[NSString stringWithFormat:msg,deadTrackCount]] == NSAlertFirstButtonReturn)
|
||||
[(PyDupeGuru *)py removeDeadTracks];
|
||||
}
|
||||
else
|
||||
{
|
||||
[Dialogs showMessage:@"You have no dead tracks in your iTunes Library"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)outlineViewSelectionDidChange:(NSNotification *)notification
|
||||
{
|
||||
[self performPySelection:[self getSelectedPaths:NO]];
|
||||
[py refreshDetailsWithSelected];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:DuplicateSelectionChangedNotification object:self];
|
||||
}
|
||||
|
||||
- (void)resultsChanged:(NSNotification *)aNotification
|
||||
{
|
||||
[matches reloadData];
|
||||
[self expandAll:nil];
|
||||
[self outlineViewSelectionDidChange:nil];
|
||||
[self refreshStats];
|
||||
}
|
||||
|
||||
- (void)resultsMarkingChanged:(NSNotification *)aNotification
|
||||
{
|
||||
[matches invalidateMarkings];
|
||||
[self refreshStats];
|
||||
}
|
||||
@end
|
||||
BIN
me/cocoa/dupeguru.icns
Executable file
BIN
me/cocoa/dupeguru.icns
Executable file
Binary file not shown.
1376
me/cocoa/dupeguru.xcodeproj/hsoft.mode1
Normal file
1376
me/cocoa/dupeguru.xcodeproj/hsoft.mode1
Normal file
File diff suppressed because it is too large
Load Diff
563
me/cocoa/dupeguru.xcodeproj/project.pbxproj
Normal file
563
me/cocoa/dupeguru.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,563 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 44;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXAppleScriptBuildPhase section */
|
||||
CE6B288A0AFB7FC900508D93 /* AppleScript */ = {
|
||||
isa = PBXAppleScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
contextName = "";
|
||||
files = (
|
||||
);
|
||||
isSharedContext = 0;
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXAppleScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
||||
CE073F6309CAE1A3005C1D2F /* dupeguru_me_help in Resources */ = {isa = PBXBuildFile; fileRef = CE073F5409CAE1A3005C1D2F /* dupeguru_me_help */; };
|
||||
CE12149E0AC86DB900E93983 /* dg.xsl in Resources */ = {isa = PBXBuildFile; fileRef = CE12149C0AC86DB900E93983 /* dg.xsl */; };
|
||||
CE12149F0AC86DB900E93983 /* hardcoded.css in Resources */ = {isa = PBXBuildFile; fileRef = CE12149D0AC86DB900E93983 /* hardcoded.css */; };
|
||||
CE1425890AFB718500BD5167 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE1425880AFB718500BD5167 /* Sparkle.framework */; };
|
||||
CE14259F0AFB719300BD5167 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE1425880AFB718500BD5167 /* Sparkle.framework */; };
|
||||
CE381C9609914ACE003581CE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CE381C9409914ACE003581CE /* AppDelegate.m */; };
|
||||
CE381C9C09914ADF003581CE /* ResultWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = CE381C9A09914ADF003581CE /* ResultWindow.m */; };
|
||||
CE381D0509915304003581CE /* dg_cocoa.plugin in Resources */ = {isa = PBXBuildFile; fileRef = CE381CF509915304003581CE /* dg_cocoa.plugin */; };
|
||||
CE3AA46709DB207900DB3A21 /* Directories.nib in Resources */ = {isa = PBXBuildFile; fileRef = CE3AA46509DB207900DB3A21 /* Directories.nib */; };
|
||||
CE515DF30FC6C12E00EC695D /* Dialogs.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515DE10FC6C12E00EC695D /* Dialogs.m */; };
|
||||
CE515DF40FC6C12E00EC695D /* HSErrorReportWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515DE30FC6C12E00EC695D /* HSErrorReportWindow.m */; };
|
||||
CE515DF50FC6C12E00EC695D /* Outline.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515DE50FC6C12E00EC695D /* Outline.m */; };
|
||||
CE515DF60FC6C12E00EC695D /* ProgressController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515DE70FC6C12E00EC695D /* ProgressController.m */; };
|
||||
CE515DF70FC6C12E00EC695D /* RecentDirectories.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515DEA0FC6C12E00EC695D /* RecentDirectories.m */; };
|
||||
CE515DF80FC6C12E00EC695D /* RegistrationInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515DEC0FC6C12E00EC695D /* RegistrationInterface.m */; };
|
||||
CE515DF90FC6C12E00EC695D /* Table.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515DEE0FC6C12E00EC695D /* Table.m */; };
|
||||
CE515DFA0FC6C12E00EC695D /* Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515DF00FC6C12E00EC695D /* Utils.m */; };
|
||||
CE515DFB0FC6C12E00EC695D /* ValueTransformers.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515DF20FC6C12E00EC695D /* ValueTransformers.m */; };
|
||||
CE515E020FC6C13E00EC695D /* ErrorReportWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = CE515DFC0FC6C13E00EC695D /* ErrorReportWindow.xib */; };
|
||||
CE515E030FC6C13E00EC695D /* progress.nib in Resources */ = {isa = PBXBuildFile; fileRef = CE515DFE0FC6C13E00EC695D /* progress.nib */; };
|
||||
CE515E040FC6C13E00EC695D /* registration.nib in Resources */ = {isa = PBXBuildFile; fileRef = CE515E000FC6C13E00EC695D /* registration.nib */; };
|
||||
CE515E1D0FC6C19300EC695D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515E160FC6C19300EC695D /* AppDelegate.m */; };
|
||||
CE515E1E0FC6C19300EC695D /* DirectoryPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515E190FC6C19300EC695D /* DirectoryPanel.m */; };
|
||||
CE515E1F0FC6C19300EC695D /* ResultWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515E1C0FC6C19300EC695D /* ResultWindow.m */; };
|
||||
CE68EE6809ABC48000971085 /* DirectoryPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = CE68EE6609ABC48000971085 /* DirectoryPanel.m */; };
|
||||
CE848A1909DD85810004CB44 /* Consts.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE848A1809DD85810004CB44 /* Consts.h */; };
|
||||
CECA899909DB12CA00A3D774 /* Details.nib in Resources */ = {isa = PBXBuildFile; fileRef = CECA899709DB12CA00A3D774 /* Details.nib */; };
|
||||
CECA899C09DB132E00A3D774 /* DetailsPanel.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CECA899A09DB132E00A3D774 /* DetailsPanel.h */; };
|
||||
CECA899D09DB132E00A3D774 /* DetailsPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = CECA899B09DB132E00A3D774 /* DetailsPanel.m */; };
|
||||
CED2A6880A05102700AC4C3F /* power_marker32.png in Resources */ = {isa = PBXBuildFile; fileRef = CED2A6870A05102600AC4C3F /* power_marker32.png */; };
|
||||
CED2A6970A05128900AC4C3F /* dgme_logo32.png in Resources */ = {isa = PBXBuildFile; fileRef = CED2A6960A05128900AC4C3F /* dgme_logo32.png */; };
|
||||
CEEB135209C837A2004D2330 /* dupeguru.icns in Resources */ = {isa = PBXBuildFile; fileRef = CEEB135109C837A2004D2330 /* dupeguru.icns */; };
|
||||
CEF7823809C8AA0200EF38FF /* gear.png in Resources */ = {isa = PBXBuildFile; fileRef = CEF7823709C8AA0200EF38FF /* gear.png */; };
|
||||
CEFC294609C89E3D00D9F998 /* folder32.png in Resources */ = {isa = PBXBuildFile; fileRef = CEFC294509C89E3D00D9F998 /* folder32.png */; };
|
||||
CEFC295509C89FF200D9F998 /* details32.png in Resources */ = {isa = PBXBuildFile; fileRef = CEFC295309C89FF200D9F998 /* details32.png */; };
|
||||
CEFC295609C89FF200D9F998 /* preferences32.png in Resources */ = {isa = PBXBuildFile; fileRef = CEFC295409C89FF200D9F998 /* preferences32.png */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
CECC02B709A36E8200CC0A94 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
CE14259F0AFB719300BD5167 /* Sparkle.framework in CopyFiles */,
|
||||
CECA899C09DB132E00A3D774 /* DetailsPanel.h in CopyFiles */,
|
||||
CE848A1909DD85810004CB44 /* Consts.h in CopyFiles */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
|
||||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = SOURCE_ROOT; };
|
||||
29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
|
||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = SOURCE_ROOT; };
|
||||
8D1107320486CEB800E47090 /* dupeGuru ME.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "dupeGuru ME.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
CE073F5409CAE1A3005C1D2F /* dupeguru_me_help */ = {isa = PBXFileReference; lastKnownFileType = folder; name = dupeguru_me_help; path = help/dupeguru_me_help; sourceTree = "<group>"; };
|
||||
CE12149C0AC86DB900E93983 /* dg.xsl */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.xml; name = dg.xsl; path = w3/dg.xsl; sourceTree = SOURCE_ROOT; };
|
||||
CE12149D0AC86DB900E93983 /* hardcoded.css */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = hardcoded.css; path = w3/hardcoded.css; sourceTree = SOURCE_ROOT; };
|
||||
CE1425880AFB718500BD5167 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = /Library/Frameworks/Sparkle.framework; sourceTree = "<absolute>"; };
|
||||
CE381C9409914ACE003581CE /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = SOURCE_ROOT; };
|
||||
CE381C9509914ACE003581CE /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = SOURCE_ROOT; };
|
||||
CE381C9A09914ADF003581CE /* ResultWindow.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = ResultWindow.m; sourceTree = SOURCE_ROOT; };
|
||||
CE381C9B09914ADF003581CE /* ResultWindow.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = ResultWindow.h; sourceTree = SOURCE_ROOT; };
|
||||
CE381CF509915304003581CE /* dg_cocoa.plugin */ = {isa = PBXFileReference; lastKnownFileType = folder; name = dg_cocoa.plugin; path = py/dist/dg_cocoa.plugin; sourceTree = SOURCE_ROOT; };
|
||||
CE3AA46609DB207900DB3A21 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/Directories.nib; sourceTree = "<group>"; };
|
||||
CE515DE00FC6C12E00EC695D /* Dialogs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Dialogs.h; path = cocoalib/Dialogs.h; sourceTree = SOURCE_ROOT; };
|
||||
CE515DE10FC6C12E00EC695D /* Dialogs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Dialogs.m; path = cocoalib/Dialogs.m; sourceTree = SOURCE_ROOT; };
|
||||
CE515DE20FC6C12E00EC695D /* HSErrorReportWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HSErrorReportWindow.h; path = cocoalib/HSErrorReportWindow.h; sourceTree = SOURCE_ROOT; };
|
||||
CE515DE30FC6C12E00EC695D /* HSErrorReportWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HSErrorReportWindow.m; path = cocoalib/HSErrorReportWindow.m; sourceTree = SOURCE_ROOT; };
|
||||
CE515DE40FC6C12E00EC695D /* Outline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Outline.h; path = cocoalib/Outline.h; sourceTree = SOURCE_ROOT; };
|
||||
CE515DE50FC6C12E00EC695D /* Outline.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Outline.m; path = cocoalib/Outline.m; sourceTree = SOURCE_ROOT; };
|
||||
CE515DE60FC6C12E00EC695D /* ProgressController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProgressController.h; path = cocoalib/ProgressController.h; sourceTree = SOURCE_ROOT; };
|
||||
CE515DE70FC6C12E00EC695D /* ProgressController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ProgressController.m; path = cocoalib/ProgressController.m; sourceTree = SOURCE_ROOT; };
|
||||
CE515DE80FC6C12E00EC695D /* PyApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PyApp.h; path = cocoalib/PyApp.h; sourceTree = SOURCE_ROOT; };
|
||||
CE515DE90FC6C12E00EC695D /* RecentDirectories.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RecentDirectories.h; path = cocoalib/RecentDirectories.h; sourceTree = SOURCE_ROOT; };
|
||||
CE515DEA0FC6C12E00EC695D /* RecentDirectories.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RecentDirectories.m; path = cocoalib/RecentDirectories.m; sourceTree = SOURCE_ROOT; };
|
||||
CE515DEB0FC6C12E00EC695D /* RegistrationInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegistrationInterface.h; path = cocoalib/RegistrationInterface.h; sourceTree = SOURCE_ROOT; };
|
||||
CE515DEC0FC6C12E00EC695D /* RegistrationInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RegistrationInterface.m; path = cocoalib/RegistrationInterface.m; sourceTree = SOURCE_ROOT; };
|
||||
CE515DED0FC6C12E00EC695D /* Table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Table.h; path = cocoalib/Table.h; sourceTree = SOURCE_ROOT; };
|
||||
CE515DEE0FC6C12E00EC695D /* Table.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Table.m; path = cocoalib/Table.m; sourceTree = SOURCE_ROOT; };
|
||||
CE515DEF0FC6C12E00EC695D /* Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Utils.h; path = cocoalib/Utils.h; sourceTree = SOURCE_ROOT; };
|
||||
CE515DF00FC6C12E00EC695D /* Utils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Utils.m; path = cocoalib/Utils.m; sourceTree = SOURCE_ROOT; };
|
||||
CE515DF10FC6C12E00EC695D /* ValueTransformers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueTransformers.h; path = cocoalib/ValueTransformers.h; sourceTree = SOURCE_ROOT; };
|
||||
CE515DF20FC6C12E00EC695D /* ValueTransformers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ValueTransformers.m; path = cocoalib/ValueTransformers.m; sourceTree = SOURCE_ROOT; };
|
||||
CE515DFD0FC6C13E00EC695D /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = cocoalib/English.lproj/ErrorReportWindow.xib; sourceTree = "<group>"; };
|
||||
CE515DFF0FC6C13E00EC695D /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = cocoalib/English.lproj/progress.nib; sourceTree = "<group>"; };
|
||||
CE515E010FC6C13E00EC695D /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = cocoalib/English.lproj/registration.nib; sourceTree = "<group>"; };
|
||||
CE515E150FC6C19300EC695D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = dgbase/AppDelegate.h; sourceTree = SOURCE_ROOT; };
|
||||
CE515E160FC6C19300EC695D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = dgbase/AppDelegate.m; sourceTree = SOURCE_ROOT; };
|
||||
CE515E170FC6C19300EC695D /* Consts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Consts.h; path = dgbase/Consts.h; sourceTree = SOURCE_ROOT; };
|
||||
CE515E180FC6C19300EC695D /* DirectoryPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DirectoryPanel.h; path = dgbase/DirectoryPanel.h; sourceTree = SOURCE_ROOT; };
|
||||
CE515E190FC6C19300EC695D /* DirectoryPanel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DirectoryPanel.m; path = dgbase/DirectoryPanel.m; sourceTree = SOURCE_ROOT; };
|
||||
CE515E1A0FC6C19300EC695D /* PyDupeGuru.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PyDupeGuru.h; path = dgbase/PyDupeGuru.h; sourceTree = SOURCE_ROOT; };
|
||||
CE515E1B0FC6C19300EC695D /* ResultWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ResultWindow.h; path = dgbase/ResultWindow.h; sourceTree = SOURCE_ROOT; };
|
||||
CE515E1C0FC6C19300EC695D /* ResultWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ResultWindow.m; path = dgbase/ResultWindow.m; sourceTree = SOURCE_ROOT; };
|
||||
CE68EE6509ABC48000971085 /* DirectoryPanel.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = DirectoryPanel.h; sourceTree = SOURCE_ROOT; };
|
||||
CE68EE6609ABC48000971085 /* DirectoryPanel.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = DirectoryPanel.m; sourceTree = SOURCE_ROOT; };
|
||||
CE848A1809DD85810004CB44 /* Consts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Consts.h; sourceTree = "<group>"; };
|
||||
CECA899809DB12CA00A3D774 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/Details.nib; sourceTree = "<group>"; };
|
||||
CECA899A09DB132E00A3D774 /* DetailsPanel.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = DetailsPanel.h; sourceTree = "<group>"; };
|
||||
CECA899B09DB132E00A3D774 /* DetailsPanel.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = DetailsPanel.m; sourceTree = "<group>"; };
|
||||
CED2A6870A05102600AC4C3F /* power_marker32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = power_marker32.png; path = images/power_marker32.png; sourceTree = SOURCE_ROOT; };
|
||||
CED2A6960A05128900AC4C3F /* dgme_logo32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = dgme_logo32.png; path = images/dgme_logo32.png; sourceTree = SOURCE_ROOT; };
|
||||
CEEB135109C837A2004D2330 /* dupeguru.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = dupeguru.icns; sourceTree = "<group>"; };
|
||||
CEF7823709C8AA0200EF38FF /* gear.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = gear.png; path = images/gear.png; sourceTree = "<group>"; };
|
||||
CEFC294509C89E3D00D9F998 /* folder32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = folder32.png; path = images/folder32.png; sourceTree = SOURCE_ROOT; };
|
||||
CEFC295309C89FF200D9F998 /* details32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = details32.png; path = images/details32.png; sourceTree = SOURCE_ROOT; };
|
||||
CEFC295409C89FF200D9F998 /* preferences32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = preferences32.png; path = images/preferences32.png; sourceTree = SOURCE_ROOT; };
|
||||
CEFF18A009A4D387005E6321 /* PyDupeGuru.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = PyDupeGuru.h; sourceTree = SOURCE_ROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8D11072E0486CEB800E47090 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
|
||||
CE1425890AFB718500BD5167 /* Sparkle.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
080E96DDFE201D6D7F000001 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CE381C9509914ACE003581CE /* AppDelegate.h */,
|
||||
CE381C9409914ACE003581CE /* AppDelegate.m */,
|
||||
CE848A1809DD85810004CB44 /* Consts.h */,
|
||||
CECA899A09DB132E00A3D774 /* DetailsPanel.h */,
|
||||
CECA899B09DB132E00A3D774 /* DetailsPanel.m */,
|
||||
CE68EE6509ABC48000971085 /* DirectoryPanel.h */,
|
||||
CE68EE6609ABC48000971085 /* DirectoryPanel.m */,
|
||||
CEFF18A009A4D387005E6321 /* PyDupeGuru.h */,
|
||||
CE381C9B09914ADF003581CE /* ResultWindow.h */,
|
||||
CE381C9A09914ADF003581CE /* ResultWindow.m */,
|
||||
);
|
||||
name = Classes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CE1425880AFB718500BD5167 /* Sparkle.framework */,
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
|
||||
);
|
||||
name = "Linked Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */,
|
||||
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FACFE9D520D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D1107320486CEB800E47090 /* dupeGuru ME.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97314FDCFA39411CA2CEA /* dupeguru */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
080E96DDFE201D6D7F000001 /* Classes */,
|
||||
CE515E140FC6C17900EC695D /* dgbase */,
|
||||
CE515DDD0FC6C09400EC695D /* cocoalib */,
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */,
|
||||
29B97317FDCFA39411CA2CEA /* Resources */,
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */,
|
||||
19C28FACFE9D520D11CA2CBB /* Products */,
|
||||
);
|
||||
name = dupeguru;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
29B97316FDCFA39411CA2CEA /* main.m */,
|
||||
);
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97317FDCFA39411CA2CEA /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CE073F5409CAE1A3005C1D2F /* dupeguru_me_help */,
|
||||
CE381CF509915304003581CE /* dg_cocoa.plugin */,
|
||||
CEFC294309C89E0000D9F998 /* images */,
|
||||
CE12149B0AC86DB900E93983 /* w3 */,
|
||||
CEEB135109C837A2004D2330 /* dupeguru.icns */,
|
||||
8D1107310486CEB800E47090 /* Info.plist */,
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
|
||||
CECA899709DB12CA00A3D774 /* Details.nib */,
|
||||
CE3AA46509DB207900DB3A21 /* Directories.nib */,
|
||||
29B97318FDCFA39411CA2CEA /* MainMenu.nib */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
|
||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CE12149B0AC86DB900E93983 /* w3 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CE12149C0AC86DB900E93983 /* dg.xsl */,
|
||||
CE12149D0AC86DB900E93983 /* hardcoded.css */,
|
||||
);
|
||||
path = w3;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
CE515DDD0FC6C09400EC695D /* cocoalib */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CE515DFC0FC6C13E00EC695D /* ErrorReportWindow.xib */,
|
||||
CE515DFE0FC6C13E00EC695D /* progress.nib */,
|
||||
CE515E000FC6C13E00EC695D /* registration.nib */,
|
||||
CE515DE00FC6C12E00EC695D /* Dialogs.h */,
|
||||
CE515DE10FC6C12E00EC695D /* Dialogs.m */,
|
||||
CE515DE20FC6C12E00EC695D /* HSErrorReportWindow.h */,
|
||||
CE515DE30FC6C12E00EC695D /* HSErrorReportWindow.m */,
|
||||
CE515DE40FC6C12E00EC695D /* Outline.h */,
|
||||
CE515DE50FC6C12E00EC695D /* Outline.m */,
|
||||
CE515DE60FC6C12E00EC695D /* ProgressController.h */,
|
||||
CE515DE70FC6C12E00EC695D /* ProgressController.m */,
|
||||
CE515DE80FC6C12E00EC695D /* PyApp.h */,
|
||||
CE515DE90FC6C12E00EC695D /* RecentDirectories.h */,
|
||||
CE515DEA0FC6C12E00EC695D /* RecentDirectories.m */,
|
||||
CE515DEB0FC6C12E00EC695D /* RegistrationInterface.h */,
|
||||
CE515DEC0FC6C12E00EC695D /* RegistrationInterface.m */,
|
||||
CE515DED0FC6C12E00EC695D /* Table.h */,
|
||||
CE515DEE0FC6C12E00EC695D /* Table.m */,
|
||||
CE515DEF0FC6C12E00EC695D /* Utils.h */,
|
||||
CE515DF00FC6C12E00EC695D /* Utils.m */,
|
||||
CE515DF10FC6C12E00EC695D /* ValueTransformers.h */,
|
||||
CE515DF20FC6C12E00EC695D /* ValueTransformers.m */,
|
||||
);
|
||||
name = cocoalib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CE515E140FC6C17900EC695D /* dgbase */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CE515E150FC6C19300EC695D /* AppDelegate.h */,
|
||||
CE515E160FC6C19300EC695D /* AppDelegate.m */,
|
||||
CE515E170FC6C19300EC695D /* Consts.h */,
|
||||
CE515E180FC6C19300EC695D /* DirectoryPanel.h */,
|
||||
CE515E190FC6C19300EC695D /* DirectoryPanel.m */,
|
||||
CE515E1A0FC6C19300EC695D /* PyDupeGuru.h */,
|
||||
CE515E1B0FC6C19300EC695D /* ResultWindow.h */,
|
||||
CE515E1C0FC6C19300EC695D /* ResultWindow.m */,
|
||||
);
|
||||
name = dgbase;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CEFC294309C89E0000D9F998 /* images */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CED2A6960A05128900AC4C3F /* dgme_logo32.png */,
|
||||
CED2A6870A05102600AC4C3F /* power_marker32.png */,
|
||||
CEF7823709C8AA0200EF38FF /* gear.png */,
|
||||
CEFC295309C89FF200D9F998 /* details32.png */,
|
||||
CEFC295409C89FF200D9F998 /* preferences32.png */,
|
||||
CEFC294509C89E3D00D9F998 /* folder32.png */,
|
||||
);
|
||||
name = images;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8D1107260486CEB800E47090 /* dupeguru */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "dupeguru" */;
|
||||
buildPhases = (
|
||||
8D1107290486CEB800E47090 /* Resources */,
|
||||
8D11072C0486CEB800E47090 /* Sources */,
|
||||
8D11072E0486CEB800E47090 /* Frameworks */,
|
||||
CECC02B709A36E8200CC0A94 /* CopyFiles */,
|
||||
CE6B288A0AFB7FC900508D93 /* AppleScript */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = dupeguru;
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
productName = dupeguru;
|
||||
productReference = 8D1107320486CEB800E47090 /* dupeGuru ME.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "dupeguru" */;
|
||||
compatibilityVersion = "Xcode 3.0";
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA /* dupeguru */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8D1107260486CEB800E47090 /* dupeguru */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8D1107290486CEB800E47090 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */,
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
|
||||
CE381D0509915304003581CE /* dg_cocoa.plugin in Resources */,
|
||||
CE073F6309CAE1A3005C1D2F /* dupeguru_me_help in Resources */,
|
||||
CEEB135209C837A2004D2330 /* dupeguru.icns in Resources */,
|
||||
CEFC294609C89E3D00D9F998 /* folder32.png in Resources */,
|
||||
CEFC295509C89FF200D9F998 /* details32.png in Resources */,
|
||||
CEFC295609C89FF200D9F998 /* preferences32.png in Resources */,
|
||||
CEF7823809C8AA0200EF38FF /* gear.png in Resources */,
|
||||
CECA899909DB12CA00A3D774 /* Details.nib in Resources */,
|
||||
CE3AA46709DB207900DB3A21 /* Directories.nib in Resources */,
|
||||
CED2A6880A05102700AC4C3F /* power_marker32.png in Resources */,
|
||||
CED2A6970A05128900AC4C3F /* dgme_logo32.png in Resources */,
|
||||
CE12149E0AC86DB900E93983 /* dg.xsl in Resources */,
|
||||
CE12149F0AC86DB900E93983 /* hardcoded.css in Resources */,
|
||||
CE515E020FC6C13E00EC695D /* ErrorReportWindow.xib in Resources */,
|
||||
CE515E030FC6C13E00EC695D /* progress.nib in Resources */,
|
||||
CE515E040FC6C13E00EC695D /* registration.nib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D11072C0486CEB800E47090 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */,
|
||||
CE381C9609914ACE003581CE /* AppDelegate.m in Sources */,
|
||||
CE381C9C09914ADF003581CE /* ResultWindow.m in Sources */,
|
||||
CE68EE6809ABC48000971085 /* DirectoryPanel.m in Sources */,
|
||||
CECA899D09DB132E00A3D774 /* DetailsPanel.m in Sources */,
|
||||
CE515DF30FC6C12E00EC695D /* Dialogs.m in Sources */,
|
||||
CE515DF40FC6C12E00EC695D /* HSErrorReportWindow.m in Sources */,
|
||||
CE515DF50FC6C12E00EC695D /* Outline.m in Sources */,
|
||||
CE515DF60FC6C12E00EC695D /* ProgressController.m in Sources */,
|
||||
CE515DF70FC6C12E00EC695D /* RecentDirectories.m in Sources */,
|
||||
CE515DF80FC6C12E00EC695D /* RegistrationInterface.m in Sources */,
|
||||
CE515DF90FC6C12E00EC695D /* Table.m in Sources */,
|
||||
CE515DFA0FC6C12E00EC695D /* Utils.m in Sources */,
|
||||
CE515DFB0FC6C12E00EC695D /* ValueTransformers.m in Sources */,
|
||||
CE515E1D0FC6C19300EC695D /* AppDelegate.m in Sources */,
|
||||
CE515E1E0FC6C19300EC695D /* DirectoryPanel.m in Sources */,
|
||||
CE515E1F0FC6C19300EC695D /* ResultWindow.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
089C165DFE840E0CC02AAC07 /* English */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
29B97319FDCFA39411CA2CEA /* English */,
|
||||
);
|
||||
name = MainMenu.nib;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
CE3AA46509DB207900DB3A21 /* Directories.nib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
CE3AA46609DB207900DB3A21 /* English */,
|
||||
);
|
||||
name = Directories.nib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CE515DFC0FC6C13E00EC695D /* ErrorReportWindow.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
CE515DFD0FC6C13E00EC695D /* English */,
|
||||
);
|
||||
name = ErrorReportWindow.xib;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
CE515DFE0FC6C13E00EC695D /* progress.nib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
CE515DFF0FC6C13E00EC695D /* English */,
|
||||
);
|
||||
name = progress.nib;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
CE515E000FC6C13E00EC695D /* registration.nib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
CE515E010FC6C13E00EC695D /* English */,
|
||||
);
|
||||
name = registration.nib;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
CECA899709DB12CA00A3D774 /* Details.nib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
CECA899809DB12CA00A3D774 /* English */,
|
||||
);
|
||||
name = Details.nib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
C01FCF4B08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(FRAMEWORK_SEARCH_PATHS)",
|
||||
"$(SRCROOT)/../../../cocoalib/build/Release",
|
||||
"\"$(SRCROOT)/../../base/cocoa/build/Release\"",
|
||||
);
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
PRODUCT_NAME = dupeGuru;
|
||||
WRAPPER_EXTENSION = app;
|
||||
ZERO_LINK = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C01FCF4C08A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(FRAMEWORK_SEARCH_PATHS)",
|
||||
"$(SRCROOT)/../../../cocoalib/build/Release",
|
||||
"\"$(SRCROOT)/../../base/cocoa/build/Release\"",
|
||||
);
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
PRODUCT_NAME = "dupeGuru ME";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
C01FCF4F08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C01FCF5008A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = (
|
||||
i386,
|
||||
ppc,
|
||||
);
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
|
||||
STRIP_INSTALLED_PRODUCT = NO;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "dupeguru" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF4B08A954540054247B /* Debug */,
|
||||
C01FCF4C08A954540054247B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "dupeguru" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF4F08A954540054247B /* Debug */,
|
||||
C01FCF5008A954540054247B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
}
|
||||
14
me/cocoa/gen.py
Normal file
14
me/cocoa/gen.py
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
|
||||
print "Generating help"
|
||||
os.chdir('help')
|
||||
os.system('python -u gen.py')
|
||||
os.system('/Developer/Applications/Utilities/Help\\ Indexer.app/Contents/MacOS/Help\\ Indexer dupeguru_me_help')
|
||||
os.chdir('..')
|
||||
|
||||
print "Generating py plugin"
|
||||
os.chdir('py')
|
||||
os.system('python -u gen.py')
|
||||
os.chdir('..')
|
||||
21
me/cocoa/main.m
Normal file
21
me/cocoa/main.m
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// main.m
|
||||
// dupeguru
|
||||
//
|
||||
// Created by Virgil Dupras on 2006/02/01.
|
||||
// Copyright __MyCompanyName__ 2006. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
NSString *pluginPath = [[NSBundle mainBundle]
|
||||
pathForResource:@"dg_cocoa"
|
||||
ofType:@"plugin"];
|
||||
NSBundle *pluginBundle = [NSBundle bundleWithPath:pluginPath];
|
||||
[pluginBundle load];
|
||||
[pool release];
|
||||
return NSApplicationMain(argc, (const char **) argv);
|
||||
}
|
||||
225
me/cocoa/py/dg_cocoa.py
Normal file
225
me/cocoa/py/dg_cocoa.py
Normal file
@@ -0,0 +1,225 @@
|
||||
#!/usr/bin/env python
|
||||
import objc
|
||||
from AppKit import *
|
||||
|
||||
from dupeguru import app_me_cocoa, scanner
|
||||
|
||||
# Fix py2app imports which chokes on relative imports
|
||||
from dupeguru import app, app_cocoa, data, directories, engine, export, ignore, results, scanner
|
||||
from hsfs import auto, manual, stats, tree, utils, music
|
||||
from hsfs.phys import music
|
||||
from hsmedia import aiff, flac, genres, id3v1, id3v2, mp4, mpeg, ogg, wma
|
||||
|
||||
class PyApp(NSObject):
|
||||
pass #fake class
|
||||
|
||||
class PyDupeGuru(PyApp):
|
||||
def init(self):
|
||||
self = super(PyDupeGuru,self).init()
|
||||
self.app = app_me_cocoa.DupeGuruME()
|
||||
return self
|
||||
|
||||
#---Directories
|
||||
def addDirectory_(self,directory):
|
||||
return self.app.AddDirectory(directory)
|
||||
|
||||
def removeDirectory_(self,index):
|
||||
self.app.RemoveDirectory(index)
|
||||
|
||||
def setDirectory_state_(self,node_path,state):
|
||||
self.app.SetDirectoryState(node_path,state)
|
||||
|
||||
#---Results
|
||||
def clearIgnoreList(self):
|
||||
self.app.scanner.ignore_list.Clear()
|
||||
|
||||
def doScan(self):
|
||||
return self.app.start_scanning()
|
||||
|
||||
def exportToXHTMLwithColumns_xslt_css_(self,column_ids,xslt_path,css_path):
|
||||
return self.app.ExportToXHTML(column_ids,xslt_path,css_path)
|
||||
|
||||
def loadIgnoreList(self):
|
||||
self.app.LoadIgnoreList()
|
||||
|
||||
def loadResults(self):
|
||||
self.app.load()
|
||||
|
||||
def markAll(self):
|
||||
self.app.results.mark_all()
|
||||
|
||||
def markNone(self):
|
||||
self.app.results.mark_none()
|
||||
|
||||
def markInvert(self):
|
||||
self.app.results.mark_invert()
|
||||
|
||||
def purgeIgnoreList(self):
|
||||
self.app.PurgeIgnoreList()
|
||||
|
||||
def toggleSelectedMark(self):
|
||||
self.app.ToggleSelectedMarkState()
|
||||
|
||||
def saveIgnoreList(self):
|
||||
self.app.SaveIgnoreList()
|
||||
|
||||
def saveResults(self):
|
||||
self.app.Save()
|
||||
|
||||
def refreshDetailsWithSelected(self):
|
||||
self.app.RefreshDetailsWithSelected()
|
||||
|
||||
def selectResultNodePaths_(self,node_paths):
|
||||
self.app.SelectResultNodePaths(node_paths)
|
||||
|
||||
def selectPowerMarkerNodePaths_(self,node_paths):
|
||||
self.app.SelectPowerMarkerNodePaths(node_paths)
|
||||
|
||||
#---Actions
|
||||
def addSelectedToIgnoreList(self):
|
||||
self.app.AddSelectedToIgnoreList()
|
||||
|
||||
def applyFilter_(self, filter):
|
||||
self.app.ApplyFilter(filter)
|
||||
|
||||
def deleteMarked(self):
|
||||
self.app.delete_marked()
|
||||
|
||||
def makeSelectedReference(self):
|
||||
self.app.MakeSelectedReference()
|
||||
|
||||
def copyOrMove_markedTo_recreatePath_(self,copy,destination,recreate_path):
|
||||
self.app.copy_or_move_marked(copy, destination, recreate_path)
|
||||
|
||||
def openSelected(self):
|
||||
self.app.OpenSelected()
|
||||
|
||||
def removeDeadTracks(self):
|
||||
self.app.remove_dead_tracks()
|
||||
|
||||
def removeMarked(self):
|
||||
self.app.results.perform_on_marked(lambda x:True, True)
|
||||
|
||||
def removeSelected(self):
|
||||
self.app.RemoveSelected()
|
||||
|
||||
def renameSelected_(self,newname):
|
||||
return self.app.RenameSelected(newname)
|
||||
|
||||
def revealSelected(self):
|
||||
self.app.RevealSelected()
|
||||
|
||||
def scanDeadTracks(self):
|
||||
self.app.scan_dead_tracks()
|
||||
|
||||
#---Misc
|
||||
def sortDupesBy_ascending_(self,key,asc):
|
||||
self.app.sort_dupes(key,asc)
|
||||
|
||||
def sortGroupsBy_ascending_(self,key,asc):
|
||||
self.app.sort_groups(key,asc)
|
||||
|
||||
#---Information
|
||||
@objc.signature('i@:')
|
||||
def deadTrackCount(self):
|
||||
return len(self.app.dead_tracks)
|
||||
|
||||
def getIgnoreListCount(self):
|
||||
return len(self.app.scanner.ignore_list)
|
||||
|
||||
def getMarkCount(self):
|
||||
return self.app.results.mark_count
|
||||
|
||||
def getStatLine(self):
|
||||
return self.app.stat_line
|
||||
|
||||
def getOperationalErrorCount(self):
|
||||
return self.app.last_op_error_count
|
||||
|
||||
#---Data
|
||||
@objc.signature('i@:i')
|
||||
def getOutlineViewMaxLevel_(self, tag):
|
||||
return self.app.GetOutlineViewMaxLevel(tag)
|
||||
|
||||
@objc.signature('@@:i@')
|
||||
def getOutlineView_childCountsForPath_(self, tag, node_path):
|
||||
return self.app.GetOutlineViewChildCounts(tag, node_path)
|
||||
|
||||
def getOutlineView_valuesForIndexes_(self,tag,node_path):
|
||||
return self.app.GetOutlineViewValues(tag,node_path)
|
||||
|
||||
def getOutlineView_markedAtIndexes_(self,tag,node_path):
|
||||
return self.app.GetOutlineViewMarked(tag,node_path)
|
||||
|
||||
def getTableViewCount_(self,tag):
|
||||
return self.app.GetTableViewCount(tag)
|
||||
|
||||
def getTableViewMarkedIndexes_(self,tag):
|
||||
return self.app.GetTableViewMarkedIndexes(tag)
|
||||
|
||||
def getTableView_valuesForRow_(self,tag,row):
|
||||
return self.app.GetTableViewValues(tag,row)
|
||||
|
||||
#---Properties
|
||||
def setMinMatchPercentage_(self, percentage):
|
||||
self.app.scanner.min_match_percentage = int(percentage)
|
||||
|
||||
def setScanType_(self, scan_type):
|
||||
try:
|
||||
self.app.scanner.scan_type = [
|
||||
scanner.SCAN_TYPE_FILENAME,
|
||||
scanner.SCAN_TYPE_FIELDS,
|
||||
scanner.SCAN_TYPE_FIELDS_NO_ORDER,
|
||||
scanner.SCAN_TYPE_TAG,
|
||||
scanner.SCAN_TYPE_CONTENT,
|
||||
scanner.SCAN_TYPE_CONTENT_AUDIO
|
||||
][scan_type]
|
||||
except IndexError:
|
||||
pass
|
||||
|
||||
def setWordWeighting_(self, words_are_weighted):
|
||||
self.app.scanner.word_weighting = words_are_weighted
|
||||
|
||||
def setMixFileKind_(self, mix_file_kind):
|
||||
self.app.scanner.mix_file_kind = mix_file_kind
|
||||
|
||||
def setDisplayDeltaValues_(self, display_delta_values):
|
||||
self.app.display_delta_values = display_delta_values
|
||||
|
||||
def setMatchSimilarWords_(self, match_similar_words):
|
||||
self.app.scanner.match_similar_words = match_similar_words
|
||||
|
||||
def setEscapeFilterRegexp_(self, escape_filter_regexp):
|
||||
self.app.options['escape_filter_regexp'] = escape_filter_regexp
|
||||
|
||||
def setRemoveEmptyFolders_(self, remove_empty_folders):
|
||||
self.app.options['clean_empty_dirs'] = remove_empty_folders
|
||||
|
||||
def enable_scanForTag_(self, enable, scan_tag):
|
||||
if enable:
|
||||
self.app.scanner.scanned_tags.add(scan_tag)
|
||||
else:
|
||||
self.app.scanner.scanned_tags.discard(scan_tag)
|
||||
|
||||
#---Worker
|
||||
def getJobProgress(self):
|
||||
return self.app.progress.last_progress
|
||||
|
||||
def getJobDesc(self):
|
||||
return self.app.progress.last_desc
|
||||
|
||||
def cancelJob(self):
|
||||
self.app.progress.job_cancelled = True
|
||||
|
||||
#---Registration
|
||||
@objc.signature('i@:')
|
||||
def isRegistered(self):
|
||||
return self.app.registered
|
||||
|
||||
@objc.signature('i@:@@')
|
||||
def isCodeValid_withEmail_(self, code, email):
|
||||
return self.app.is_code_valid(code, email)
|
||||
|
||||
def setRegisteredCode_andEmail_(self, code, email):
|
||||
self.app.set_registration(code, email)
|
||||
|
||||
18
me/cocoa/py/gen.py
Normal file
18
me/cocoa/py/gen.py
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import os.path as op
|
||||
import shutil
|
||||
|
||||
from hsutil.build import print_and_do
|
||||
|
||||
os.chdir('dupeguru')
|
||||
print_and_do('python gen.py')
|
||||
os.chdir('..')
|
||||
|
||||
if op.exists('build'):
|
||||
shutil.rmtree('build')
|
||||
if op.exists('dist'):
|
||||
shutil.rmtree('dist')
|
||||
|
||||
print_and_do('python -u setup.py py2app')
|
||||
14
me/cocoa/py/setup.py
Normal file
14
me/cocoa/py/setup.py
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from distutils.core import setup
|
||||
import py2app
|
||||
|
||||
from hsutil.build import move_testdata_out, put_testdata_back
|
||||
|
||||
move_log = move_testdata_out()
|
||||
try:
|
||||
setup(
|
||||
plugin = ['dg_cocoa.py'],
|
||||
)
|
||||
finally:
|
||||
put_testdata_back(move_log)
|
||||
75
me/cocoa/w3/dg.xsl
Normal file
75
me/cocoa/w3/dg.xsl
Normal file
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output
|
||||
method="xml"
|
||||
encoding="utf-8"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
|
||||
indent="yes"/>
|
||||
|
||||
<xsl:template match="column">
|
||||
<xsl:if test="@enabled = 'y'">
|
||||
<th>
|
||||
<xsl:value-of select="@display"/>
|
||||
</th>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="file">
|
||||
<tr>
|
||||
<xsl:variable name="td_class">
|
||||
<xsl:if test="position() > 1">
|
||||
<xsl:text>indented</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="file_node" select="."/>
|
||||
<xsl:for-each select="data">
|
||||
<xsl:variable name="data_pos" select="position()"/>
|
||||
<xsl:if test="document('columns.xml')/columns/column[$data_pos]/@enabled = 'y'">
|
||||
<td>
|
||||
<xsl:if test="position() = 1">
|
||||
<xsl:attribute name="class">
|
||||
<xsl:value-of select="$td_class"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="@value"/>
|
||||
</td>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<!-- <xsl:for-each select="//results/column">
|
||||
<td>
|
||||
<xsl:variable name="attr_name">
|
||||
<xsl:text>attr_</xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
</xsl:variable>
|
||||
<xsl:value-of select="$file_node/@*[local-name(.) = $attr_name]"/>
|
||||
</td>
|
||||
</xsl:for-each> -->
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="group">
|
||||
<xsl:apply-templates select="file"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="results">
|
||||
<html>
|
||||
<head>
|
||||
<title>dupeGuru Results</title>
|
||||
<link rel="stylesheet" href="hardcoded.css" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>dupeGuru Results</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<xsl:apply-templates select="document('columns.xml')/columns/column"/>
|
||||
</tr>
|
||||
<xsl:apply-templates select="group"/>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
71
me/cocoa/w3/hardcoded.css
Normal file
71
me/cocoa/w3/hardcoded.css
Normal file
@@ -0,0 +1,71 @@
|
||||
BODY
|
||||
{
|
||||
background-color:white;
|
||||
}
|
||||
|
||||
BODY,A,P,UL,TABLE,TR,TD
|
||||
{
|
||||
font-family:Tahoma,Arial,sans-serif;
|
||||
font-size:10pt;
|
||||
color: #4477AA;
|
||||
}
|
||||
|
||||
TABLE
|
||||
{
|
||||
background-color: #225588;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
TR
|
||||
{
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
TH
|
||||
{
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
background-color: #C8D6E5;
|
||||
}
|
||||
|
||||
TH TD
|
||||
{
|
||||
color:black;
|
||||
}
|
||||
|
||||
TD
|
||||
{
|
||||
padding-left: 2pt;
|
||||
}
|
||||
|
||||
TD.rightelem
|
||||
{
|
||||
text-align:right;
|
||||
/*padding-left:0pt;*/
|
||||
padding-right: 2pt;
|
||||
width: 17%;
|
||||
}
|
||||
|
||||
TD.indented
|
||||
{
|
||||
padding-left: 12pt;
|
||||
}
|
||||
|
||||
H1
|
||||
{
|
||||
font-family:"Courier New",monospace;
|
||||
color:#6699CC;
|
||||
font-size:18pt;
|
||||
color:#6da500;
|
||||
border-color: #70A0CF;
|
||||
border-width: 1pt;
|
||||
border-style: solid;
|
||||
margin-top: 16pt;
|
||||
margin-left: 5%;
|
||||
margin-right: 5%;
|
||||
padding-top: 2pt;
|
||||
padding-bottom:2pt;
|
||||
text-align: center;
|
||||
}
|
||||
Reference in New Issue
Block a user