comparison mainwindow.cpp @ 196:dbc8d97caaf4

* Avoid showing hard hyphen on Windows (I had thought this was in previous commit)
author Chris Cannam
date Fri, 24 Dec 2010 13:16:12 +0000
parents ff0d76dcb3b8
children 2afac743acdf
comparison
equal deleted inserted replaced
195:ff0d76dcb3b8 196:dbc8d97caaf4
1283 hgStat(); 1283 hgStat();
1284 } 1284 }
1285 1285
1286 QString MainWindow::format3(QString head, QString intro, QString code) 1286 QString MainWindow::format3(QString head, QString intro, QString code)
1287 { 1287 {
1288 code = xmlEncode(code).replace("\n", "<br>").replace("-", "&#8209;").replace(" ", "&nbsp;"); 1288 code = xmlEncode(code).replace("\n", "<br>")
1289 #ifndef Q_OS_WIN32
1290 // The hard hyphen comes out funny on Windows
1291 .replace("-", "&#8209;")
1292 #endif
1293 .replace(" ", "&nbsp;");
1289 if (intro == "") { 1294 if (intro == "") {
1290 return QString("<qt><h3>%1</h3><p><code>%2</code></p>") 1295 return QString("<qt><h3>%1</h3><p><code>%2</code></p>")
1291 .arg(head).arg(code); 1296 .arg(head).arg(code);
1292 } else if (code == "") { 1297 } else if (code == "") {
1293 return QString("<qt><h3>%1</h3><p>%2</p>") 1298 return QString("<qt><h3>%1</h3><p>%2</p>")
1620 QMessageBox::information(this, tr("Update"), tr("<qt><h3>Update successful</h3><p>%1</p>").arg(xmlEncode(output))); 1625 QMessageBox::information(this, tr("Update"), tr("<qt><h3>Update successful</h3><p>%1</p>").arg(xmlEncode(output)));
1621 shouldHgStat = true; 1626 shouldHgStat = true;
1622 break; 1627 break;
1623 1628
1624 case ACT_MERGE: 1629 case ACT_MERGE:
1625 QMessageBox::information(this, tr("Update"), tr("<qt><h3>Merge successful</h3><p>%1</p>").arg(xmlEncode(output))); 1630 //!!! use format3?
1631 QMessageBox::information(this, tr("Merge"), tr("<qt><h3>Merge successful</h3><pre>%1</pre>").arg(xmlEncode(output)));
1626 shouldHgStat = true; 1632 shouldHgStat = true;
1627 justMerged = true; 1633 justMerged = true;
1628 break; 1634 break;
1629 1635
1630 case ACT_RETRY_MERGE: 1636 case ACT_RETRY_MERGE: