mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 14:41:39 +00:00
Cleaned up some cruft.
This commit is contained in:
@@ -23,11 +23,6 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
|
||||
- (NSNumber *)doScan;
|
||||
|
||||
- (NSArray *)selectedPowerMarkerNodePaths;
|
||||
- (void)selectPowerMarkerNodePaths:(NSArray *)aIndexPaths;
|
||||
- (NSArray *)selectedResultNodePaths;
|
||||
- (void)selectResultNodePaths:(NSArray *)aIndexPaths;
|
||||
|
||||
- (void)toggleSelectedMark;
|
||||
- (void)markAll;
|
||||
- (void)markInvert;
|
||||
|
||||
@@ -80,7 +80,7 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
{
|
||||
NSIndexPath *path = item;
|
||||
NSString *identifier = [column identifier];
|
||||
if ([identifier isEqual:@"mark"]) {
|
||||
if ([identifier isEqual:@"marked"]) {
|
||||
return b2n([self boolProperty:@"marked" valueAtPath:path]);
|
||||
}
|
||||
NSInteger columnId = [identifier integerValue];
|
||||
@@ -89,17 +89,20 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
|
||||
- (void)outlineView:(NSOutlineView *)aOutlineView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn byItem:(id)item
|
||||
{
|
||||
if (![[tableColumn identifier] isEqual:@"0"])
|
||||
return; //We only want to cover renames.
|
||||
NSIndexPath *path = item;
|
||||
NSString *oldName = [[self py] valueForPath:p2a(path) column:0];
|
||||
NSString *newName = object;
|
||||
if (![newName isEqual:oldName]) {
|
||||
BOOL renamed = [[self py] renameSelected:newName];
|
||||
if (!renamed) {
|
||||
[Dialogs showMessage:[NSString stringWithFormat:@"The name '%@' already exists.", newName]];
|
||||
if ([[tableColumn identifier] isEqual:@"0"]) {
|
||||
NSIndexPath *path = item;
|
||||
NSString *oldName = [[self py] valueForPath:p2a(path) column:0];
|
||||
NSString *newName = object;
|
||||
if (![newName isEqual:oldName]) {
|
||||
BOOL renamed = [[self py] renameSelected:newName];
|
||||
if (!renamed) {
|
||||
[Dialogs showMessage:[NSString stringWithFormat:@"The name '%@' already exists.", newName]];
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
[super outlineView:aOutlineView setObjectValue:object forTableColumn:tableColumn byItem:item];
|
||||
}
|
||||
}
|
||||
|
||||
/* Delegate */
|
||||
@@ -115,7 +118,7 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
{
|
||||
NSIndexPath *path = item;
|
||||
BOOL isMarkable = [self boolProperty:@"markable" valueAtPath:path];
|
||||
if ([[tableColumn identifier] isEqual:@"mark"]) {
|
||||
if ([[tableColumn identifier] isEqual:@"marked"]) {
|
||||
[cell setEnabled:isMarkable];
|
||||
}
|
||||
if ([cell isKindOfClass:[NSTextFieldCell class]]) {
|
||||
|
||||
@@ -40,7 +40,6 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
- (NSDictionary *)getColumnsWidth;
|
||||
- (NSArray *)getSelectedPaths:(BOOL)aDupesOnly;
|
||||
- (void)initResultColumns;
|
||||
- (void)performPySelection:(NSArray *)aIndexPaths;
|
||||
- (void)restoreColumnsPosition:(NSArray *)aColumnsOrder widths:(NSDictionary *)aColumnsWidth;
|
||||
|
||||
/* Actions */
|
||||
@@ -56,7 +55,6 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
- (IBAction)markInvert:(id)sender;
|
||||
- (IBAction)markNone:(id)sender;
|
||||
- (IBAction)markSelected:(id)sender;
|
||||
- (IBAction)markToggle:(id)sender;
|
||||
- (IBAction)moveMarked:(id)sender;
|
||||
- (IBAction)openClicked:(id)sender;
|
||||
- (IBAction)openSelected:(id)sender;
|
||||
|
||||
@@ -139,7 +139,7 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
}
|
||||
//Add columns and set widths
|
||||
for (NSString *colId in aColumnsOrder) {
|
||||
if ([colId isEqual:@"mark"]) {
|
||||
if ([colId isEqual:@"marked"]) {
|
||||
continue;
|
||||
}
|
||||
NSTableColumn *col = [_resultColumns objectAtIndex:[colId intValue]];
|
||||
@@ -152,28 +152,6 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
}
|
||||
}
|
||||
|
||||
// - (void)updatePySelection
|
||||
// {
|
||||
// NSArray *selection;
|
||||
// if (_powerMode) {
|
||||
// selection = [py selectedPowerMarkerNodePaths];
|
||||
// }
|
||||
// else {
|
||||
// selection = [py selectedResultNodePaths];
|
||||
// }
|
||||
// [matches selectNodePaths:selection];
|
||||
// }
|
||||
|
||||
- (void)performPySelection:(NSArray *)aIndexPaths
|
||||
{
|
||||
if ([outline powerMarkerMode]) {
|
||||
[py selectPowerMarkerNodePaths:aIndexPaths];
|
||||
}
|
||||
else {
|
||||
[py selectResultNodePaths:aIndexPaths];
|
||||
}
|
||||
}
|
||||
|
||||
/* Actions */
|
||||
- (IBAction)clearIgnoreList:(id)sender
|
||||
{
|
||||
@@ -268,14 +246,6 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
|
||||
- (IBAction)markSelected:(id)sender
|
||||
{
|
||||
[self performPySelection:[self getSelectedPaths:YES]];
|
||||
[py toggleSelectedMark];
|
||||
}
|
||||
|
||||
- (IBAction)markToggle:(id)sender
|
||||
{
|
||||
NSIndexPath *path = [matches itemAtRow:[matches clickedRow]];
|
||||
[self performPySelection:[NSArray arrayWithObject:p2a(path)]];
|
||||
[py toggleSelectedMark];
|
||||
}
|
||||
|
||||
@@ -310,7 +280,6 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
|
||||
- (IBAction)openSelected:(id)sender
|
||||
{
|
||||
[self performPySelection:[self getSelectedPaths:NO]];
|
||||
[py openSelected];
|
||||
}
|
||||
|
||||
@@ -331,7 +300,6 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
return;
|
||||
if ([Dialogs askYesNo:[NSString stringWithFormat:@"You are about to remove %d files from results. Continue?",[pathList count]]] == NSAlertSecondButtonReturn) // NO
|
||||
return;
|
||||
[self performPySelection:[self getSelectedPaths:YES]];
|
||||
[py removeSelected];
|
||||
}
|
||||
|
||||
@@ -349,7 +317,6 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
|
||||
- (IBAction)revealSelected:(id)sender
|
||||
{
|
||||
[self performPySelection:[self getSelectedPaths:NO]];
|
||||
[py revealSelected];
|
||||
}
|
||||
|
||||
@@ -469,11 +436,6 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
[Dialogs showMessage:msg];
|
||||
}
|
||||
|
||||
- (void)outlineViewSelectionDidChange:(NSNotification *)notification
|
||||
{
|
||||
[self performPySelection:[self getSelectedPaths:NO]];
|
||||
}
|
||||
|
||||
- (BOOL)validateToolbarItem:(NSToolbarItem *)theItem
|
||||
{
|
||||
return ![[ProgressController mainProgressController] isShown];
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="406"/>
|
||||
<integer value="29"/>
|
||||
<integer value="21"/>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
@@ -710,7 +710,7 @@
|
||||
<object class="NSMutableArray" key="NSTableColumns">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSTableColumn" id="430098394">
|
||||
<string key="NSIdentifier">mark</string>
|
||||
<string key="NSIdentifier">marked</string>
|
||||
<double key="NSWidth">47</double>
|
||||
<double key="NSMinWidth">16</double>
|
||||
<double key="NSMaxWidth">1000</double>
|
||||
@@ -752,6 +752,7 @@
|
||||
<int key="NSPeriodicDelay">400</int>
|
||||
<int key="NSPeriodicInterval">75</int>
|
||||
</object>
|
||||
<bool key="NSIsEditable">YES</bool>
|
||||
<reference key="NSTableView" ref="40047569"/>
|
||||
</object>
|
||||
<object class="NSTableColumn" id="932540235">
|
||||
@@ -1691,14 +1692,6 @@
|
||||
</object>
|
||||
<int key="connectionID">410</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">markToggle:</string>
|
||||
<reference key="source" ref="339936126"/>
|
||||
<reference key="destination" ref="705360835"/>
|
||||
</object>
|
||||
<int key="connectionID">414</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">stats</string>
|
||||
|
||||
Reference in New Issue
Block a user