Commits

Alessandro Bahgat committed 97ed06f

Added a descriptive alert to the clone panel.
The new alert is displayed when the user fails to specify the source and/or destination URLs.

  • Participants
  • Parent commits 590e793

Comments (0)

Files changed (2)

English.lproj/Localizable.strings

 /* Error message for hg commit */
 "Missing commit message" = "Missing commit message";
 
+/* Title of pre-clone failure alert */
+"Missing required parameters" = "Missing required parameters";
+
 /* Button in remove modified files dialogs */
 "Move to Trash" = "Move to Trash";
 
 /* Title of Update alert */
 "Update to revision?" = "Update to revision?";
 
+/* Body of pre-clone failure alert */
+"You must select both a source and a destination" = "You must select both a source and a destination";
+

Source/MercurialApp.m

             NSURL *dstURL = _cloneDstURLField.objectValue;
             if( ! srcURL || ! dstURL ) {
                 NSBeep();
+                NSRunInformationalAlertPanel(NSLocalizedString(@"Missing required parameters", 
+                                                               @"Title of pre-clone failure alert"),
+                                             NSLocalizedString(@"You must select both a source and a destination", 
+                                                               @"Body of pre-clone failure alert"),
+                                             nil, nil, nil);
                 // operation not completed because one of the URLs (or both) is invalid
                 terminate = NO;
                 continue;
                                                                    @"Title of post-clone success alert"),
                                                  NSLocalizedString(@"Successfully created a cloned repository at \n\n%@", 
                                                                    @"Body of post-clone success alert"),
-                                                 nil, nil, nil,
-                                                 dstURL.absoluteString);
+                                                 nil, nil, nil);
                 
                 // ok button was pressed and clone was performed
                 terminate = YES;