Index: trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h	(revision 362)
+++ trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h	(revision 363)
@@ -355,4 +355,6 @@
     static QString formatSize (Q_UINT64, int aMode = 0);
 
+    static QString highlight (const QString &aStr, bool aToolTip = false);
+
 signals:
 
Index: trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h	(revision 362)
+++ trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h	(revision 363)
@@ -199,5 +199,4 @@
                            const QString &errorMsg);
 
-    static QString highlight (const QString &str);
     static QString formatErrorInfo (const COMErrorInfo &info,
                                     HRESULT wrapperRC = S_OK);
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp	(revision 362)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp	(revision 363)
@@ -1616,4 +1616,57 @@
     
     return QString ("%1 %2").arg (number).arg (Suffixes [suffix]);
+}
+
+/* static */
+/**
+ *  Reformats the input string @a aStr so that:
+ *  - strings in single quotes will be put inside <nobr> and marked
+ *    with blue color;
+ *  - UUIDs be put inside <nobr> and marked
+ *    with green color;
+ *  - replaces new line chars with </p><p> constructs to form paragraphs
+ *    (note that <p> and </p> are not appended to the beginnign and to the
+ *     end of the string respectively, to allow the result be appended
+ *     or prepended to the existing paragraph).
+ *
+ *  If @a aToolTip is true, colouring is not applied, only the <nobr> tag
+ *  is added. Also, new line chars are replaced with <br> instead of <p>.
+ */
+QString VBoxGlobal::highlight (const QString &aStr, bool aToolTip /* = false */)
+{
+    QString strFont; 
+    QString uuidFont;
+    QString endFont;
+    if (!aToolTip)
+    {
+        strFont = "<font color=#0000CC>";
+        uuidFont = "<font color=#008000>";
+        endFont = "</font>";
+    }
+    
+    QString text = aStr;
+
+    /* mark strings in single quotes with color */
+    QRegExp rx = QRegExp ("((?:^|\\s)[(]?)'([^']*)'(?=[:.-!);]?(?:\\s|$))");
+    rx.setMinimal (true);
+    text.replace (rx,
+        QString ("\\1%1<nobr>'\\2'</nobr>%2")
+                 .arg (strFont). arg (endFont));
+
+    /* mark UUIDs with color */
+    text.replace (QRegExp (
+        "((?:^|\\s)[(]?)"
+        "(\\{[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\\})"
+        "(?=[:.-!);]?(?:\\s|$))"),
+        QString ("\\1%1<nobr>\\2</nobr>%2")
+                 .arg (uuidFont). arg (endFont));
+
+    /* split to paragraphs at \n chars */
+    if (!aToolTip)
+        text.replace ('\n', "</p><p>");
+    else
+        text.replace ('\n', "<br>");
+
+    return text;
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp	(revision 362)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp	(revision 363)
@@ -464,11 +464,9 @@
                                                   const QString &error)
 {
-    message (
-        mainWindowShown(),
-        Critical,
+    message (mainWindowShown(), Critical,
         tr ("<p>Failed to load the global GUI configuration.</p>"
             "<p>The application will now terminate.</p>"),
-        !vbox.isOk() ? formatErrorInfo (vbox) : highlight (error)
-    );
+        !vbox.isOk() ? formatErrorInfo (vbox)
+                     : QString ("<p>%1</p>").arg (VBoxGlobal::highlight (error)));
 }
 
@@ -1336,5 +1334,5 @@
                               "<tr><td><p>%1.</p></td></tr>"
                               "</table><p></p>")
-                              .arg (highlight (errorMsg));
+                              .arg (VBoxGlobal::highlight (errorMsg));
 
     if (!errorID.isEmpty())
@@ -1390,23 +1388,4 @@
 
 /* static */
-QString VBoxProblemReporter::highlight (const QString &str)
-{
-    QString text = str;
-    /* mark strings in single quotes with color */
-    QRegExp rx = QRegExp ("((?:^|\\s)[(]?)'([^']*)'(?=[:.-!);]?(?:\\s|$))");
-    rx.setMinimal (true);
-    text.replace (rx, "\\1'<font color=#0000CC>\\2</font>'");
-    /* mark UUIDs with color */
-    text.replace (QRegExp (
-        "((?:^|\\s)[(]?)"
-        "(\\{[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\\})"
-        "(?=[:.-!);]?(?:\\s|$))"),
-        "\\1<font color=#008000>\\2</font>");
-    /* split to paragraphs at \n chars */
-    text.replace ('\n', "</p><p>");
-    return text;
-}
-
-/* static */
 QString VBoxProblemReporter::formatErrorInfo (const COMErrorInfo &info,
                                               HRESULT wrapperRC)
@@ -1419,5 +1398,5 @@
                               "<tr><td><p>%1.</p></td></tr>"
                               "</table><p></p>")
-                              .arg (highlight (info.text()));
+                              .arg (VBoxGlobal::highlight (info.text()));
 
     formatted += "<table bgcolor=#EEEEEE border=0 cellspacing=0 "
Index: trunk/src/VBox/Frontends/VirtualBox/ui/VBoxDiskImageManagerDlg.ui.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/ui/VBoxDiskImageManagerDlg.ui.h	(revision 362)
+++ trunk/src/VBox/Frontends/VirtualBox/ui/VBoxDiskImageManagerDlg.ui.h	(revision 363)
@@ -965,5 +965,6 @@
             tip = tr ("<nobr><b>%1</b></nobr><br>%2", "HDD")
                       .arg (location)
-                      .arg (aHd.GetLastAccessError());
+                      .arg (VBoxGlobal::highlight (aHd.GetLastAccessError(),
+                                                   true /* aToolTip */));
             break;
         }
