@@ -64,6 +64,7 @@ - (void)registerServices
64
64
- (void )applicationDidFinishLaunching : (NSNotification *)notification
65
65
{
66
66
[[SUUpdater sharedUpdater ] setSendsSystemProfile: YES ];
67
+ [[SUUpdater sharedUpdater ] setDelegate: self ];
67
68
68
69
// Make sure Git's SSH password requests get forwarded to our little UI tool:
69
70
setenv ( " SSH_ASKPASS" , [[[NSBundle mainBundle ] pathForResource: @" gitx_askpasswd" ofType: @" " ] UTF8String ], 1 );
@@ -196,11 +197,6 @@ - (IBAction)installCliTool:(id)sender;
196
197
former cannot be found), the system's temporary directory.
197
198
*/
198
199
199
- - (IBAction ) showHelp : (id ) sender
200
- {
201
- [[NSWorkspace sharedWorkspace ] openURL: [NSURL URLWithString: @" http://gitx.frim.nl/user_manual.html" ]];
202
- }
203
-
204
200
- (NSString *)applicationSupportFolder {
205
201
206
202
NSArray *paths = NSSearchPathForDirectoriesInDomains (NSApplicationSupportDirectory, NSUserDomainMask, YES );
@@ -380,4 +376,44 @@ - (void) dealloc {
380
376
[managedObjectModel release ], managedObjectModel = nil ;
381
377
[super dealloc ];
382
378
}
379
+
380
+
381
+ #pragma mark Sparkle delegate methods
382
+
383
+ - (NSArray *)feedParametersForUpdater : (SUUpdater *)updater sendingSystemProfile : (BOOL )sendingProfile
384
+ {
385
+ NSArray *keys = [NSArray arrayWithObjects: @" key" , @" displayKey" , @" value" , @" displayValue" , nil ];
386
+ NSMutableArray *feedParameters = [NSMutableArray array ];
387
+
388
+ // only add parameters if the profile is being sent this time
389
+ if (sendingProfile) {
390
+ NSString *CFBundleGitVersion = [[[NSBundle mainBundle ] infoDictionary ] valueForKey: @" CFBundleGitVersion" ];
391
+ if (CFBundleGitVersion)
392
+ [feedParameters addObject: [NSDictionary dictionaryWithObjects: [NSArray arrayWithObjects: @" CFBundleGitVersion" , @" Full Version" , CFBundleGitVersion, CFBundleGitVersion, nil ]
393
+ forKeys: keys]];
394
+
395
+ NSString *gitVersion = [PBGitBinary version ];
396
+ if (gitVersion)
397
+ [feedParameters addObject: [NSDictionary dictionaryWithObjects: [NSArray arrayWithObjects: @" gitVersion" , @" git Version" , gitVersion, gitVersion, nil ]
398
+ forKeys: keys]];
399
+ }
400
+
401
+ return feedParameters;
402
+ }
403
+
404
+
405
+ #pragma mark Help menu
406
+
407
+ - (IBAction )showHelp : (id )sender
408
+ {
409
+ [[NSWorkspace sharedWorkspace ] openURL: [NSURL URLWithString: @" http://gitx.frim.nl/user_manual.html" ]];
410
+ }
411
+
412
+ - (IBAction )reportAProblem : (id )sender
413
+ {
414
+ [[NSWorkspace sharedWorkspace ] openURL: [NSURL URLWithString: @" http://gitx.lighthouseapp.com/tickets" ]];
415
+ }
416
+
417
+
418
+
383
419
@end
0 commit comments