add hexfiend as a submodule, other minor tweaks

This commit is contained in:
Eric Gallager 2013-05-23 11:28:28 -04:00
parent 050ec7438f
commit af3a382919
7 changed files with 1233 additions and 16 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "HexFiend"]
path = HexFiend
url = https://github.com/ridiculousfish/HexFiend.git

View File

@ -12,7 +12,7 @@
[newArray addObject:[self objectAtIndex:*(buffer+i)]];
free(buffer);
return [NSArray arrayWithArray:newArray];
}
@end
@ -105,7 +105,7 @@
- (void)removeIndiciesInRange:(NSRange)range
{ [self removeIndexesInRange:range]; }
- (void)shiftIndiciesStartingAtIndex:(unsigned int)index by:(int)delta
{ [self shiftIndexesStartingAtIndex:index by:delta]; }
{ [self shiftIndexesStartingAtIndex:index by:delta]; }
@end
#pragma mark -
@ -286,4 +286,4 @@
#endif
return (CGLContextObj) [self CGLContextObj];
}
@end
@end

View File

@ -13,4 +13,4 @@
- (BOOL)boolValue;
+ (NSString *)stringWithBool:(BOOL)boolean;
@end
@end

View File

@ -63,17 +63,17 @@
HFSUniStr255 *resourceForkName = (HFSUniStr255 *) NewPtrClear(sizeof(HFSUniStr255));
OSErr error = FSGetResourceForkName(resourceForkName);
forkName = [(NSDictionary *)[forks objectAtIndex:row] objectForKey:[tableColumn identifier]];
// return custom names for data and resource forks
if([forkName isEqualToString:@""])
forkName = NSLocalizedString(@"Data Fork", nil);
else if(!error && [forkName isEqualToString:[NSString stringWithCharacters:resourceForkName->unicode length:resourceForkName->length]])
forkName = NSLocalizedString(@"Resource Fork", nil);
DisposePtr((Ptr) resourceForkName);
return forkName;
}
// return default value otherwise
return [(NSDictionary *)[forks objectAtIndex:row] objectForKey:[tableColumn identifier]];
}
@ -95,7 +95,7 @@
[forks addObject:[NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"UNTITLED_FORK", nil), @"forkname", [NSNumber numberWithInt:0], @"forksize", [NSNumber numberWithInt:0], @"forkallocation", nil]];
[forkTableView noteNumberOfRowsChanged];
[forkTableView reloadData];
// start editing placeholder
[forkTableView selectRowIndexes:[NSIndexSet indexSetWithIndex:[forks count]-1] byExtendingSelection:NO];
[forkTableView editColumn:0 row:[forks count]-1 withEvent:nil select:YES];
@ -105,7 +105,7 @@
{
// display warning
// delete fork
// update table view
[forks removeObjectAtIndex:[forkTableView selectedRow]+1];
[forkTableView noteNumberOfRowsChanged];
@ -128,4 +128,4 @@
return forkTableView;
}
@end
@end

View File

@ -7,4 +7,4 @@
int main(int argc, const char *argv[])
{
return NSApplicationMain(argc, argv);
}
}

1
HexFiend Submodule

@ -0,0 +1 @@
Subproject commit 7a8b17b6bf0b965f4bc8e9161704124f24863a5d

File diff suppressed because it is too large Load Diff