diff --git a/ApplicationController.m b/ApplicationController.m
index 3bc6724..c337129 100644
--- a/ApplicationController.m
+++ b/ApplicationController.m
@@ -217,7 +217,7 @@ - (NSPersistentStoreCoordinator *)
persistentStoreCoordinator {
fileManager = [NSFileManager defaultManager];
applicationSupportFolder = [self applicationSupportFolder];
if ( ![fileManager fileExistsAtPath:applicationSupportFolder
isDirectory:NULL] ) {
- [fileManager createDirectoryAtPath:applicationSupportFolder
attributes:nil];
+ [fileManager createDirectoryAtPath:applicationSupportFolder
withIntermediateDirectories:YES attributes:nil error:&error];
}
url = [NSURL fileURLWithPath: [applicationSupportFolder
stringByAppendingPathComponent: @"GitTest.xml"]];
diff --git a/DBPrefsWindowController.h b/DBPrefsWindowController.h
index cc208de..01c2259 100644
--- a/DBPrefsWindowController.h
+++ b/DBPrefsWindowController.h
@@ -42,7 +42,7 @@
#import <Cocoa/Cocoa.h>
-...@interface DBPrefsWindowController : NSWindowController {
+...@interface DBPrefsWindowController : NSWindowController
<NSAnimationDelegate, NSToolbarDelegate> {
NSMutableArray *toolbarIdentifiers;
NSMutableDictionary *toolbarViews;
NSMutableDictionary *toolbarItems;
diff --git a/GitX.xcodeproj/project.pbxproj b/GitX.xcodeproj/project.pbxproj
index 8f8f62c..af4e8d4 100644
--- a/GitX.xcodeproj/project.pbxproj
+++ b/GitX.xcodeproj/project.pbxproj
@@ -1097,6 +1097,7 @@
26FC0A890875C7B200E6366F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
GCC_ENABLE_OBJC_GC = required;
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = DEBUG_BUILD;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -1104,16 +1105,14 @@
INFOPLIST_PREPROCESS = YES;
PREBINDING = NO;
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+ VALID_ARCHS = "i386 x86_64";
};
name = Debug;
};
26FC0A8A0875C7B200E6366F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = (
- ppc,
- i386,
- );
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
GCC_ENABLE_OBJC_GC = required;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
@@ -1121,6 +1120,7 @@
INFOPLIST_PREPROCESS = YES;
PREBINDING = NO;
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+ VALID_ARCHS = "i386 x86_64";
};
name = Release;
};
diff --git a/PBGitCommitController.m b/PBGitCommitController.m
index 6a77348..e11c24d 100644
--- a/PBGitCommitController.m
+++ b/PBGitCommitController.m
@@ -150,7 +150,7 @@ - (void)commitFinished:(NSNotification *)notification
{
[commitMessageView setEditable:YES];
[commitMessageView setString:@""];
- [webController setStateMessage:[NSString
stringWithFormat:[[notification userInfo] objectForKey:@"description"]]];
+ [webController setStateMessage:[NSString
stringWithString:[[notification userInfo] objectForKey:@"description"]]];
}
- (void)commitFailed:(NSNotification *)notification
diff --git a/PBGitConfig.h b/PBGitConfig.h
index 9875a3c..b4be71c 100644
--- a/PBGitConfig.h
+++ b/PBGitConfig.h
@@ -15,5 +15,5 @@
}
- init;
-- initWithRepository:(NSString *)path;
+- initWithPath:(NSString *)path;
@end
diff --git a/PBGitConfig.m b/PBGitConfig.m
index 9166cc4..8f14931 100644
--- a/PBGitConfig.m
+++ b/PBGitConfig.m
@@ -17,7 +17,7 @@ @implementation PBGitConfig
return self;
}
-- initWithRepository:(NSString *)path
+- initWithPath:(NSString *)path
{
repositoryPath = path;
return self;
diff --git a/PBGitHistoryController.m b/PBGitHistoryController.m
index a9fde36..2a62d83 100644
--- a/PBGitHistoryController.m
+++ b/PBGitHistoryController.m
@@ -103,7 +103,7 @@ - (IBAction) openSelectedFile: sender
return;
PBGitTree* tree = [selectedFiles objectAtIndex:0];
NSString* name = [tree tmpFileNameForContents];
- [[NSWorkspace sharedWorkspace] openTempFile:name];
+ [[NSWorkspace sharedWorkspace] openFile:name];
}
- (IBAction) setDetailedView: sender {
diff --git a/PBGitRepository.m b/PBGitRepository.m
index 821cd2a..3ed2b48 100644
--- a/PBGitRepository.m
+++ b/PBGitRepository.m
@@ -103,7 +103,7 @@ - (BOOL)readFromURL:(NSURL *)absoluteURL ofType:(NSString
*)typeName error:(NSEr
NSURL* gitDirURL = [PBGitRepository gitDirForURL:[self fileURL]];
if (!gitDirURL) {
if (outError) {
- NSDictionary* userInfo = [NSDictionary
dictionaryWithObject:[NSString stringWithFormat:@"%@ does not appear to be a
git repository.", [self fileName]]
+ NSDictionary* userInfo = [NSDictionary
dictionaryWithObject:[NSString stringWithFormat:@"%@ does not appear to be a
git repository.", [self fileURL]]
forKey:NSLocalizedRecoverySuggestionErrorKey];
*outError = [NSError
errorWithDomain:PBGitRepositoryErrorDomain code:0 userInfo:userInfo];
}
@@ -118,7 +118,7 @@ - (BOOL)readFromURL:(NSURL *)absoluteURL ofType:(NSString
*)typeName error:(NSEr
- (void) setup
{
- config = [[PBGitConfig alloc] initWithRepository:self.fileURL.path];
+ config = [[PBGitConfig alloc] initWithPath:self.fileURL.path];
self.branches = [NSMutableArray array];
[self reloadRefs];
revisionList = [[PBGitRevList alloc] initWithRepository:self];
diff --git a/PBGitTree.m b/PBGitTree.m
index c8003d1..a4bc69f 100644
--- a/PBGitTree.m
+++ b/PBGitTree.m
@@ -151,13 +151,14 @@ - (NSString *)textContents
- (void) saveToFolder: (NSString *) dir
{
NSString* newName = [dir stringByAppendingPathComponent:path];
+ NSError* error;
if (leaf) {
NSFileHandle* handle = [repository handleForArguments:[NSArray
arrayWithObjects:@"show", [self refSpec], nil]];
NSData* data = [handle readDataToEndOfFile];
[data writeToFile:newName atomically:YES];
} else { // Directory
- [[NSFileManager defaultManager] createDirectoryAtPath:newName
attributes:nil];
+ [[NSFileManager defaultManager] createDirectoryAtPath:newName
withIntermediateDirectories:YES attributes:nil error:&error];
for (PBGitTree* child in [self children])
[child saveToFolder: newName];
}
@@ -243,8 +244,9 @@ - (NSString*) fullPath
- (void) finalize
{
+ NSError* error;
if (localFileName)
- [[NSFileManager defaultManager] removeFileAtPath:localFileName
handler:nil];
+ [[NSFileManager defaultManager] removeItemAtPath:localFileName
error:&error];
[super finalize];
}
@end
diff --git a/PBGitWindowController.h b/PBGitWindowController.h
index ae2298b..d859c04 100644
--- a/PBGitWindowController.h
+++ b/PBGitWindowController.h
@@ -10,7 +10,7 @@
#import "PBGitRepository.h"
@class PBViewController;
-...@interface PBGitWindowController : NSWindowController {
+...@interface PBGitWindowController : NSWindowController <NSWindowDelegate> {
__weak PBGitRepository* repository;
int selectedViewIndex;
IBOutlet NSView* contentView;
diff --git a/PBQLOutlineView.m b/PBQLOutlineView.m
index 459d908..b5d17b9 100644
--- a/PBQLOutlineView.m
+++ b/PBQLOutlineView.m
@@ -70,8 +70,9 @@ - (NSMenu *)menuForEvent:(NSEvent *)theEvent
int row = [self rowAtPoint:mousePoint];
// figure out if the row that was just clicked on is currently
selected
- if ([selectedRowIndexes containsIndex:row] == NO)
- [self selectRow:row byExtendingSelection:NO];
+ if ([selectedRowIndexes containsIndex:row] == NO)
+ [self selectRowIndexes:[NSIndexSet
indexSetWithIndex:row] byExtendingSelection:NO];
+
}
return [controller contextMenuForTreeView];
diff --git a/PBWebController.m b/PBWebController.m
index d185593..d95b1b2 100644
--- a/PBWebController.m
+++ b/PBWebController.m
@@ -111,9 +111,16 @@ - (void) log: (NSString*) logMessage
- (BOOL) isReachable:(NSString *)hostname
{
SCNetworkConnectionFlags flags;
- if (!SCNetworkCheckReachabilityByName([hostname
cStringUsingEncoding:NSASCIIStringEncoding], &flags))
+ SCNetworkReachabilityRef target;
+
+ target = SCNetworkReachabilityCreateWithName(NULL, [hostname
cStringUsingEncoding:NSASCIIStringEncoding]);
+ if (!SCNetworkReachabilityGetFlags(target, &flags)) {
+ CFRelease(target);
return FALSE;
-
+ }
+
+ CFRelease(target);
+
// If a connection is required, then it's not reachable
if (flags & (kSCNetworkFlagsConnectionRequired |
kSCNetworkFlagsConnectionAutomatic | kSCNetworkFlagsInterventionRequired))
return FALSE;
Mark
[email protected]
--
To unsubscribe, reply using "remove me" as the subject.