mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Get rid of some unnecessary casts
This commit is contained in:
committed by
Pieter de Bie
parent
df4a50aebe
commit
c12e8b9dd4
+2
-2
@@ -53,11 +53,11 @@
|
||||
|
||||
if ([arguments count] > 0 && ([[arguments objectAtIndex:0] isEqualToString:@"--commit"] ||
|
||||
[[arguments objectAtIndex:0] isEqualToString:@"-c"]))
|
||||
[((PBGitWindowController *)document.windowController) showCommitView:self];
|
||||
[document.windowController showCommitView:self];
|
||||
else {
|
||||
PBGitRevSpecifier* rev = [[PBGitRevSpecifier alloc] initWithParameters:arguments];
|
||||
document.currentBranch = [document addBranch: rev];
|
||||
[(PBGitWindowController *)document.windowController showHistoryView:self];
|
||||
[document.windowController showHistoryView:self];
|
||||
}
|
||||
[NSApp activateIgnoringOtherApps:YES];
|
||||
|
||||
|
||||
+3
-1
@@ -10,9 +10,11 @@
|
||||
#import <WebKit/WebView.h>
|
||||
#import "PBGitHistoryController.h"
|
||||
|
||||
@class PBWebHistoryController;
|
||||
|
||||
@interface PBCommitList : NSTableView {
|
||||
IBOutlet WebView* webView;
|
||||
IBOutlet id webController;
|
||||
IBOutlet PBWebHistoryController *webController;
|
||||
IBOutlet PBGitHistoryController *controller;
|
||||
|
||||
NSPoint mouseDownPoint;
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
[webView scrollPageDown: self];
|
||||
}
|
||||
else if ([character rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@"jkcv"]].location == 0)
|
||||
[((PBWebHistoryController *)webController) sendKey: character];
|
||||
[webController sendKey: character];
|
||||
else
|
||||
[super keyDown: event];
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
- (NSMenu *)menuForEvent:(NSEvent *)theEvent
|
||||
{
|
||||
if ([self delegate])
|
||||
return [(PBGitIndexController *)[self delegate] menuForTable: self];
|
||||
return [[self delegate] menuForTable: self];
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "PBViewController.h"
|
||||
|
||||
@class PBGitIndexController;
|
||||
@class PBIconAndTextCell;
|
||||
@class PBWebChangesController;
|
||||
|
||||
@interface PBGitCommitController : PBViewController {
|
||||
NSMutableArray *files;
|
||||
@@ -18,8 +20,8 @@
|
||||
IBOutlet NSArrayController *unstagedFilesController;
|
||||
IBOutlet NSArrayController *cachedFilesController;
|
||||
|
||||
IBOutlet id indexController;
|
||||
IBOutlet id webController;
|
||||
IBOutlet PBGitIndexController *indexController;
|
||||
IBOutlet PBWebChangesController *webController;
|
||||
|
||||
NSString *status;
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
}
|
||||
- (void) removeView
|
||||
{
|
||||
[(PBWebChangesController *)webController closeView];
|
||||
[webController closeView];
|
||||
[super finalize];
|
||||
}
|
||||
|
||||
@@ -325,8 +325,8 @@
|
||||
if (ret)
|
||||
return [self commitFailedBecause:@"Could not update HEAD"];
|
||||
|
||||
[(PBWebChangesController *)webController setStateMessage:[NSString stringWithFormat:@"Successfully created commit %@", commit]];
|
||||
|
||||
[webController setStateMessage:[NSString stringWithFormat:@"Successfully created commit %@", commit]];
|
||||
|
||||
repository.hasChanged = YES;
|
||||
self.busy--;
|
||||
[commitMessageView setString:@""];
|
||||
|
||||
+3
-1
@@ -13,6 +13,8 @@
|
||||
|
||||
extern NSString* PBGitRepositoryErrorDomain;
|
||||
|
||||
@class PBGitWindowController;
|
||||
|
||||
@interface PBGitRepository : NSDocument {
|
||||
PBGitRevList* revisionList;
|
||||
PBGitConfig *config;
|
||||
@@ -58,7 +60,7 @@ extern NSString* PBGitRepositoryErrorDomain;
|
||||
- (void) setup;
|
||||
|
||||
@property (assign) BOOL hasChanged;
|
||||
@property (readonly) NSWindowController *windowController;
|
||||
@property (readonly) PBGitWindowController *windowController;
|
||||
@property (readonly) PBGitConfig *config;
|
||||
@property (retain) PBGitRevList* revisionList;
|
||||
@property (assign) NSMutableArray* branches;
|
||||
|
||||
+1
-1
@@ -174,7 +174,7 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
#endif
|
||||
}
|
||||
|
||||
- (NSWindowController *)windowController
|
||||
- (PBGitWindowController *)windowController
|
||||
{
|
||||
if ([[self windowControllers] count] == 0)
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user