24
24
25
25
@interface PBRemoteProgressSheet ()
26
26
27
- - (void ) beginRemoteProgressSheetForArguments : (NSArray *)args title : (NSString *)theTitle description : (NSString *)theDescription inDir : (NSString *)dir windowController : (PBGitWindowController *)controller ;
27
+ - (void ) beginRemoteProgressSheetForArguments : (NSArray *)args title : (NSString *)theTitle description : (NSString *)theDescription inDir : (NSString *)dir windowController : (NSWindowController *)windowController ;
28
28
- (void ) showSuccessMessage ;
29
29
- (void ) showErrorMessage ;
30
30
@@ -52,7 +52,7 @@ @implementation PBRemoteProgressSheet
52
52
#pragma mark -
53
53
#pragma mark PBRemoteProgressSheet
54
54
55
- + (void ) beginRemoteProgressSheetForArguments : (NSArray *)args title : (NSString *)theTitle description : (NSString *)theDescription inDir : (NSString *)dir windowController : (PBGitWindowController *)windowController
55
+ + (void ) beginRemoteProgressSheetForArguments : (NSArray *)args title : (NSString *)theTitle description : (NSString *)theDescription inDir : (NSString *)dir windowController : (NSWindowController *)windowController
56
56
{
57
57
PBRemoteProgressSheet *sheet = [[self alloc ] initWithWindowNibName: @" PBRemoteProgressSheet" ];
58
58
[sheet beginRemoteProgressSheetForArguments: args title: theTitle description: theDescription inDir: dir windowController: windowController];
@@ -65,7 +65,7 @@ + (void) beginRemoteProgressSheetForArguments:(NSArray *)args title:(NSString *)
65
65
}
66
66
67
67
68
- - (void ) beginRemoteProgressSheetForArguments : (NSArray *)args title : (NSString *)theTitle description : (NSString *)theDescription inDir : (NSString *)dir windowController : (PBGitWindowController *)windowController
68
+ - (void ) beginRemoteProgressSheetForArguments : (NSArray *)args title : (NSString *)theTitle description : (NSString *)theDescription inDir : (NSString *)dir windowController : (NSWindowController *)windowController
69
69
{
70
70
controller = windowController;
71
71
arguments = args;
@@ -120,7 +120,7 @@ - (void) taskCompleted:(NSNotification *)notification
120
120
[self showSuccessMessage ];
121
121
122
122
if ([controller respondsToSelector: @selector (repository )])
123
- [controller. repository reloadRefs ];
123
+ [[(PBGitWindowController *) controller repository ] reloadRefs ];
124
124
}
125
125
126
126
@@ -146,7 +146,8 @@ - (void) showSuccessMessage
146
146
[info appendString: [self commandDescription ]];
147
147
[info appendString: [self standardOutputDescription ]];
148
148
149
- [(PBGitWindowController *)controller showMessageSheet: [self successTitle ] infoText: info];
149
+ if ([controller respondsToSelector: @selector (showMessageSheet:infoText: )])
150
+ [(PBGitWindowController *)controller showMessageSheet: [self successTitle ] infoText: info];
150
151
}
151
152
152
153
@@ -164,7 +165,8 @@ - (void) showErrorMessage
164
165
nil ];
165
166
NSError *error = [NSError errorWithDomain: PBGitRepositoryErrorDomain code: 0 userInfo: errorUserInfo];
166
167
167
- [(PBGitWindowController *)controller showErrorSheet: error];
168
+ if ([controller respondsToSelector: @selector (showErrorSheet: )])
169
+ [(PBGitWindowController *)controller showErrorSheet: error];
168
170
}
169
171
170
172
0 commit comments