From 024e3c380f45b78c3084e66c20b74ce79c3fdabf Mon Sep 17 00:00:00 2001 From: hsoft Date: Fri, 30 Oct 2009 14:45:38 +0000 Subject: [PATCH] dgse cocoa: Adjusted to the dgme change (applicationDidFinishLaunching: pushed down and column removal in xib). --HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%40234 --- se/cocoa/AppDelegate.h | 3 --- se/cocoa/AppDelegate.m | 17 ----------------- se/cocoa/ResultWindow.m | 8 +++++--- 3 files changed, 5 insertions(+), 23 deletions(-) diff --git a/se/cocoa/AppDelegate.h b/se/cocoa/AppDelegate.h index 43264f9e..602b6038 100644 --- a/se/cocoa/AppDelegate.h +++ b/se/cocoa/AppDelegate.h @@ -8,14 +8,11 @@ http://www.hardcoded.net/licenses/hs_license #import #import "dgbase/AppDelegate.h" -#import "ResultWindow.h" #import "DirectoryPanel.h" #import "PyDupeGuru.h" @interface AppDelegate : AppDelegateBase { - IBOutlet ResultWindow *result; - DirectoryPanel *_directoryPanel; } - (IBAction)openWebsite:(id)sender; diff --git a/se/cocoa/AppDelegate.m b/se/cocoa/AppDelegate.m index 746d8abf..dbb7d071 100644 --- a/se/cocoa/AppDelegate.m +++ b/se/cocoa/AppDelegate.m @@ -65,23 +65,6 @@ http://www.hardcoded.net/licenses/hs_license - (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!"]; - //Restore results - [py loadIgnoreList]; - [py loadResults]; -} - - (void)applicationWillBecomeActive:(NSNotification *)aNotification { if (![[result window] isVisible]) diff --git a/se/cocoa/ResultWindow.m b/se/cocoa/ResultWindow.m index 55a30386..7f70d11a 100644 --- a/se/cocoa/ResultWindow.m +++ b/se/cocoa/ResultWindow.m @@ -216,12 +216,14 @@ http://www.hardcoded.net/licenses/hs_license NSTableColumn *refCol = [matches tableColumnWithIdentifier:@"0"]; _resultColumns = [[NSMutableArray alloc] init]; [_resultColumns addObject:[matches tableColumnWithIdentifier:@"0"]]; // File Name - [_resultColumns addObject:[matches tableColumnWithIdentifier:@"1"]]; // Directory - [_resultColumns addObject:[matches tableColumnWithIdentifier:@"2"]]; // Size + [_resultColumns addObject:[self getColumnForIdentifier:1 title:@"Directory" width:120 refCol:refCol]]; + NSTableColumn *sizeCol = [self getColumnForIdentifier:2 title:@"Size (KB)" width:63 refCol:refCol]; + [[sizeCol dataCell] setAlignment:NSRightTextAlignment]; + [_resultColumns addObject:sizeCol]; [_resultColumns addObject:[self getColumnForIdentifier:3 title:@"Kind" width:40 refCol:refCol]]; [_resultColumns addObject:[self getColumnForIdentifier:4 title:@"Creation" width:120 refCol:refCol]]; [_resultColumns addObject:[self getColumnForIdentifier:5 title:@"Modification" width:120 refCol:refCol]]; - [_resultColumns addObject:[matches tableColumnWithIdentifier:@"6"]]; // Match % + [_resultColumns addObject:[self getColumnForIdentifier:6 title:@"Match %" width:60 refCol:refCol]]; [_resultColumns addObject:[self getColumnForIdentifier:7 title:@"Words Used" width:120 refCol:refCol]]; [_resultColumns addObject:[self getColumnForIdentifier:8 title:@"Dupe Count" width:80 refCol:refCol]]; }