1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

Moved column information in new edition-specific core result_table units.

This commit is contained in:
Virgil Dupras
2011-11-27 12:47:00 -05:00
parent eb83b830df
commit 7e95404903
17 changed files with 149 additions and 113 deletions

View File

@@ -7,10 +7,12 @@ http://www.hardcoded.net/licenses/bsd_license
*/
#import <Cocoa/Cocoa.h>
#import "PyResultTable.h"
#import "PyApp.h"
@interface PyDupeGuruBase : PyApp
- (void)bindCocoa:(id)cocoa;
- (PyResultTable *)resultTable;
//Actions
- (NSNumber *)addDirectory:(NSString *)name;
- (void)removeDirectory:(NSNumber *)index;

View File

@@ -17,7 +17,7 @@ http://www.hardcoded.net/licenses/bsd_license
- (NSString *)valueForRow:(NSInteger)rowIndex column:(NSString *)aColumn;
- (BOOL)renameSelected:(NSString *)aNewName;
- (void)sortBy:(NSInteger)aIdentifier ascending:(BOOL)aAscending;
- (void)sortBy:(NSString *)aIdentifier ascending:(BOOL)aAscending;
- (void)markSelected;
- (void)removeSelected;
- (NSInteger)selectedDupeCount;

View File

@@ -17,7 +17,7 @@ http://www.hardcoded.net/licenses/bsd_license
NSIndexSet *_deltaColumns;
HSColumns *columns;
}
- (id)initWithPyParent:(id)aPyParent view:(NSTableView *)aTableView;
- (id)initWithPy:(id)aPy view:(NSTableView *)aTableView;
- (PyResultTable *)py;
- (HSColumns *)columns;
- (BOOL)powerMarkerMode;

View File

@@ -18,9 +18,9 @@ http://www.hardcoded.net/licenses/bsd_license
@end
@implementation ResultTable
- (id)initWithPyParent:(id)aPyParent view:(NSTableView *)aTableView
- (id)initWithPy:(id)aPy view:(NSTableView *)aTableView
{
self = [super initWithPyClassName:@"PyResultTable" pyParent:aPyParent view:aTableView];
self = [super initWithPy:aPy view:aTableView];
columns = [[HSColumns alloc] initWithPy:[[self py] columns] tableView:aTableView];
[self connect];
return self;
@@ -145,7 +145,7 @@ http://www.hardcoded.net/licenses/bsd_license
if ([[tableView sortDescriptors] count] < 1)
return;
NSSortDescriptor *sd = [[tableView sortDescriptors] objectAtIndex:0];
[[self py] sortBy:[[sd key] integerValue] ascending:[sd ascending]];
[[self py] sortBy:[sd key] ascending:[sd ascending]];
}
- (void)tableView:(NSTableView *)aTableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)column row:(NSInteger)row

View File

@@ -24,7 +24,7 @@ http://www.hardcoded.net/licenses/bsd_license
columnsMenu = [app columnsMenu];
/* Put a cute iTunes-like bottom bar */
[[self window] setContentBorderThickness:28 forEdge:NSMinYEdge];
table = [[ResultTable alloc] initWithPyParent:py view:matches];
table = [[ResultTable alloc] initWithPy:[py resultTable] view:matches];
statsLabel = [[StatsLabel alloc] initWithPyParent:py labelView:stats];
problemDialog = [[ProblemDialog alloc] initWithPy:py];
[self initResultColumns];