]> git.saurik.com Git - cydia.git/commitdiff
Commit separate errors during popErrorWithTitle:.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 21 Feb 2011 14:47:26 +0000 (06:47 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 21 Feb 2011 15:03:49 +0000 (07:03 -0800)
MobileCydia.mm

index 2b8c772b07342d1083b22998661f1cea6827bc57..888c43eb648be458022853d47cbd0080467cc237 100644 (file)
@@ -3388,29 +3388,25 @@ static NSString *Warning_;
 
 - (bool) popErrorWithTitle:(NSString *)title {
     bool fatal(false);
-    std::string message;
 
     while (!_error->empty()) {
         std::string error;
         bool warning(!_error->PopMessage(error));
         if (!warning)
             fatal = true;
+
         for (;;) {
             size_t size(error.size());
             if (size == 0 || error[size - 1] != '\n')
                 break;
             error.resize(size - 1);
         }
+
         lprintf("%c:[%s]\n", warning ? 'W' : 'E', error.c_str());
 
-        if (!message.empty())
-            message += "\n\n";
-        message += error;
+        [delegate_ _setProgressError:[NSString stringWithUTF8String:error.c_str()] withTitle:[NSString stringWithFormat:Colon_, (warning ? Warning_ : Error_), title]];
     }
 
-    if (fatal && !message.empty())
-        [delegate_ _setProgressError:[NSString stringWithUTF8String:message.c_str()] withTitle:[NSString stringWithFormat:Colon_, fatal ? Error_ : Warning_, title]];
-
     return fatal;
 }