<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -7,6 +7,15 @@
 
 #import &lt;Cocoa/Cocoa.h&gt;
 
+/*
+ OPTIONAL: use Growl to post the 'thank you' message after feedback is sent.
+ If your app includes the Growl framework, set USE_GROWL to 1 and JRFeedbackController.m 
+ will include the GrowlApplicationBridge.h file required, and post a Growl message when
+ the feedback is sent.
+ NOTE: you must add an entry to your Growl Dict plist to register this new message
+ */
+#define USE_GROWL 0
+
 typedef enum {
     JRFeedbackController_BugReport,
     JRFeedbackController_FeatureRequest,
@@ -42,4 +51,9 @@ typedef enum {
 - (void)postFeedback:(NSString*)systemProfile;
 - (void)setTextViewStringTo:(NSString *)details;
 
+- (void)displayAlertMessage:(NSString *)message 
+		withInformativeText:(NSString *)text 
+			  andAlertStyle:(NSAlertStyle)alertStyle;
+
+
 @end</diff>
      <filename>lib/JRFeedbackController.h</filename>
    </modified>
    <modified>
      <diff>@@ -10,6 +10,10 @@
 #import &quot;NSURLRequest+postForm.h&quot;
 #import &lt;SystemConfiguration/SCNetwork.h&gt;
 
+#if USE_GROWL
+	#import &lt;Growl/GrowlApplicationBridge.h&gt;
+#endif
+
 JRFeedbackController *gFeedbackController = nil;
 
 NSString *JRFeedbackType[JRFeedbackController_SectionCount] = {
@@ -223,13 +227,58 @@ NSString *JRFeedbackType[JRFeedbackController_SectionCount] = {
 }
 
 - (void)connectionDidFinishLoading:(NSURLConnection*)connection {
-    // TODO Drop Thank you sheet
-    [self closeFeedback];
+#if USE_GROWL
+	[GrowlApplicationBridge setGrowlDelegate:@&quot;&quot;];
+	[GrowlApplicationBridge notifyWithTitle:@&quot;Thank you!&quot;
+								description:@&quot;Your feedback has been sent&quot;
+						   notificationName:@&quot;Feedback Sent&quot;
+								   iconData:nil
+								   priority:0
+								   isSticky:NO
+							   clickContext:nil];
+	[self closeFeedback];
+#else
+	//	drop thank you sheet
+	[self displayAlertMessage:@&quot;Thank you for your feedback!&quot;
+		  withInformativeText:@&quot;Your feedback has been sent&quot;
+				andAlertStyle:NSInformationalAlertStyle];
+#endif
+}
+
+- (void)alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo
+{
+	[self closeFeedback];//moved from connectionDidFinishLoading:
+}
+
+- (void)displayAlertMessage:(NSString *)message 
+		withInformativeText:(NSString *)text 
+			  andAlertStyle:(NSAlertStyle)alertStyle
+{
+	NSAlert *thankYouAlert = [[[NSAlert alloc] init] autorelease];
+	[thankYouAlert addButtonWithTitle:@&quot;OK&quot;];
+	[thankYouAlert setMessageText:message];
+	[thankYouAlert setInformativeText:text];
+	[thankYouAlert setAlertStyle:alertStyle];
+	
+	//	stop the animation of the progress indicator, so user doesn't think 
+	//	something is still going on
+	[progress stopAnimation:self];
+	
+	//	disply thank you
+    [thankYouAlert beginSheetModalForWindow:[gFeedbackController window]
+							  modalDelegate:self 
+							 didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:)
+								contextInfo:nil];
 }
 
 - (void)connection:(NSURLConnection*)connection didFailWithError:(NSError*)error {
     NSLog(@&quot;-[JRFeedback connection:didFailWithError:%@]&quot;, error);
-    [self closeFeedback];
+	
+	//	drop fail sheet
+	[self displayAlertMessage:@&quot;An Error Occured&quot;
+		  withInformativeText:@&quot;There was a problem sending your feedback.  Please try again at another time&quot;
+				andAlertStyle:NSInformationalAlertStyle];
+
 }
 
 - (void)windowWillClose:(NSNotification*)notification {</diff>
      <filename>lib/JRFeedbackController.m</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>86b6ed69406f259ce7e961fe10337d753b73733e</id>
    </parent>
  </parents>
  <author>
    <name>Clint Shryock</name>
    <email>clint@ctshryock.com</email>
  </author>
  <url>http://github.com/rentzsch/jrfeedbackprovider/commit/7ee0fe8deb4cce4876493815df943fc69ebaa200</url>
  <id>7ee0fe8deb4cce4876493815df943fc69ebaa200</id>
  <committed-date>2009-07-20T17:49:44-07:00</committed-date>
  <authored-date>2009-07-20T06:52:07-07:00</authored-date>
  <message>Added thank you / error sheets, thanking user for feedback of displaying an error on connection:didFailWithError:.
Added new method displayAlertMessage:withInformativeText:andAlertStyle: so both success status and failure status could be routed
through the same method with different texts.

Added optional Growl support, displaying thank you in Growl notification, but left error in a sheet.

Signed-off-by: Jonathan 'Wolf' Rentzsch &lt;jwr.git@redshed.net&gt;</message>
  <tree>0d90280e67ca00f34341c8ac25019845e372b88b</tree>
  <committer>
    <name>Jonathan 'Wolf' Rentzsch</name>
    <email>jwr.git@redshed.net</email>
  </committer>
</commit>
