Feedback now sends along a version number with it.
parent
428a307c90
commit
b5e85a9a3c
|
@ -66,7 +66,9 @@
|
||||||
feedbackSocket = [[FeedbackSocket alloc] init];
|
feedbackSocket = [[FeedbackSocket alloc] init];
|
||||||
[feedbackSocket setDelegate:self];
|
[feedbackSocket setDelegate:self];
|
||||||
|
|
||||||
[feedbackSocket sendFeedback:[fromView stringValue] subject:[subjectView stringValue] message:[messageView string]];
|
NSString *version = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"];
|
||||||
|
|
||||||
|
[feedbackSocket sendFeedback:[fromView stringValue] subject:[subjectView stringValue] message:[messageView string] version:version];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)cancel:(id)sender
|
- (IBAction)cancel:(id)sender
|
||||||
|
|
|
@ -13,15 +13,17 @@
|
||||||
NSString *from;
|
NSString *from;
|
||||||
NSString *subject;
|
NSString *subject;
|
||||||
NSString *message;
|
NSString *message;
|
||||||
|
NSString *version;
|
||||||
|
|
||||||
id delegate;
|
id delegate;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setDelegate:(id)d;
|
- (void)setDelegate:(id)d;
|
||||||
- (void)sendFeedback: (NSString *)f subject:(NSString *)s message:(NSString *)m;
|
- (void)sendFeedback: (NSString *)f subject:(NSString *)s message:(NSString *)m version:(NSString *)v;
|
||||||
|
|
||||||
- (void)setFrom:(NSString *)f;
|
- (void)setFrom:(NSString *)f;
|
||||||
- (void)setSubject:(NSString *)s;
|
- (void)setSubject:(NSString *)s;
|
||||||
- (void)setMessage:(NSString *)m;
|
- (void)setMessage:(NSString *)m;
|
||||||
|
- (void)setVersion:(NSString *)v;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -26,8 +26,9 @@ NSString *encodeForURL(NSString *s)
|
||||||
NSString *f = encodeForURL(from);
|
NSString *f = encodeForURL(from);
|
||||||
NSString *s = encodeForURL(subject);
|
NSString *s = encodeForURL(subject);
|
||||||
NSString *m = encodeForURL(message);
|
NSString *m = encodeForURL(message);
|
||||||
|
NSString *v = encodeForURL(version);
|
||||||
|
|
||||||
NSString *postString = [NSString stringWithFormat:@"from=%@&subject=%@&message=%@", f, s, m];
|
NSString *postString = [NSString stringWithFormat:@"from=%@&subject=%@&message=%@&version=%@", f, s, m, v];
|
||||||
|
|
||||||
NSData *postData = [postString dataUsingEncoding:NSASCIIStringEncoding];
|
NSData *postData = [postString dataUsingEncoding:NSASCIIStringEncoding];
|
||||||
|
|
||||||
|
@ -55,7 +56,7 @@ NSString *encodeForURL(NSString *s)
|
||||||
[pool release];
|
[pool release];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)sendFeedback: (NSString *)f subject:(NSString *)s message:(NSString *)m
|
- (void)sendFeedback: (NSString *)f subject:(NSString *)s message:(NSString *)m version:(NSString *)v
|
||||||
{
|
{
|
||||||
// DBLog(@"Detaching thread for feedback");
|
// DBLog(@"Detaching thread for feedback");
|
||||||
if ([f isEqualToString:@""])
|
if ([f isEqualToString:@""])
|
||||||
|
@ -65,6 +66,7 @@ NSString *encodeForURL(NSString *s)
|
||||||
[self setFrom:f];
|
[self setFrom:f];
|
||||||
[self setSubject:s];
|
[self setSubject:s];
|
||||||
[self setMessage:m];
|
[self setMessage:m];
|
||||||
|
[self setVersion:v];
|
||||||
|
|
||||||
[NSThread detachNewThreadSelector:@selector(sendFeedbackThread:) toTarget:self withObject:nil];
|
[NSThread detachNewThreadSelector:@selector(sendFeedbackThread:) toTarget:self withObject:nil];
|
||||||
}
|
}
|
||||||
|
@ -128,4 +130,12 @@ NSString *encodeForURL(NSString *s)
|
||||||
message = m;
|
message = m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)setVersion:(NSString *)v
|
||||||
|
{
|
||||||
|
[v retain];
|
||||||
|
[version release];
|
||||||
|
|
||||||
|
version = v;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue