mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 15:30:18 +00:00
Bug fix: Various smaller fixes regarding GC, dot notation, etc...
This commit is contained in:
@@ -85,6 +85,7 @@ catch_exit:
|
||||
if (pmatch)
|
||||
free(pmatch);
|
||||
regfree(&preg);
|
||||
[[NSGarbageCollector defaultCollector] collectIfNeeded];
|
||||
return outMatches;
|
||||
}
|
||||
|
||||
|
||||
+3
-4
@@ -20,12 +20,11 @@
|
||||
- (id)init
|
||||
{
|
||||
if (self = [super init]) {
|
||||
self.connection = [NSConnection new];
|
||||
[self.connection setRootObject:self];
|
||||
connection = [NSConnection new];
|
||||
[connection setRootObject:self];
|
||||
|
||||
if ([self.connection registerName:ConnectionName] == NO)
|
||||
if ([connection registerName:ConnectionName] == NO)
|
||||
NSBeep();
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#import "PBGitRepository.h"
|
||||
|
||||
@class PBViewController;
|
||||
@interface PBGitWindowController : NSWindowController {
|
||||
@interface PBGitWindowController : NSWindowController <NSWindowDelegate> {
|
||||
__weak PBGitRepository* repository;
|
||||
int selectedViewIndex;
|
||||
IBOutlet NSView* contentView;
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
[item bind:@"selectedIndex" toObject:self withKeyPath:@"selectedViewIndex" options:0];
|
||||
[item setEnabled: ![repository isBareRepository]];
|
||||
|
||||
[self.window setToolbar:toolbar];
|
||||
[[self window] setToolbar:toolbar];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
+13
-11
@@ -71,24 +71,26 @@
|
||||
|
||||
// figure out if the row that was just clicked on is currently selected
|
||||
if ([selectedRowIndexes containsIndex:row] == NO)
|
||||
[self selectRow:row byExtendingSelection:NO];
|
||||
[self selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
|
||||
}
|
||||
|
||||
return [controller contextMenuForTreeView];
|
||||
}
|
||||
|
||||
/* Implemented to satisfy datasourcee protocol */
|
||||
- (BOOL) outlineView: (NSOutlineView *)ov
|
||||
isItemExpandable: (id)item { return YES; }
|
||||
- (BOOL) outlineView:(NSOutlineView *)ov isItemExpandable:(id)item {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSInteger) outlineView: (NSOutlineView *)ov
|
||||
numberOfChildrenOfItem:(id)item { return 0; }
|
||||
- (NSInteger) outlineView:(NSOutlineView *)ov numberOfChildrenOfItem:(id)item {
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (id) outlineView: (NSOutlineView *)ov
|
||||
child:(NSInteger)index
|
||||
ofItem:(id)item { return nil; }
|
||||
- (id) outlineView:(NSOutlineView *)ov child:(NSInteger)index ofItem:(id)item {
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (id) outlineView: (NSOutlineView *)ov
|
||||
objectValueForTableColumn:(NSTableColumn*)col
|
||||
byItem:(id)item { return nil; }
|
||||
- (id) outlineView:(NSOutlineView *)ov objectValueForTableColumn:(NSTableColumn *)col byItem:(id)item {
|
||||
return nil;
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
|
||||
@interface PBUnsortableTableHeader : NSTableHeaderView {
|
||||
IBOutlet NSArrayController *controller;
|
||||
int clickCount;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
#import "PBUnsortableTableHeader.h"
|
||||
|
||||
|
||||
@implementation PBUnsortableTableHeader
|
||||
|
||||
- (void)mouseDown:(NSEvent *)theEvent
|
||||
@@ -30,7 +29,7 @@
|
||||
if (++clickCount == 3)
|
||||
{
|
||||
clickCount = 0;
|
||||
controller.sortDescriptors = [NSArray array];
|
||||
[controller setSortDescriptors:[NSArray array]];
|
||||
[controller rearrangeObjects];
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user