comparison mainwindow.cpp @ 275:1244dc3107cb more_information_dialog

* Some work on separating out the "more information" component from dialog messages. Will need work on layouts
author Chris Cannam
date Mon, 31 Jan 2011 17:23:10 +0000
parents cc95394e2392
children c0c254f67346
comparison
equal deleted inserted replaced
273:cc95394e2392 275:1244dc3107cb
41 #include "debug.h" 41 #include "debug.h"
42 #include "logparser.h" 42 #include "logparser.h"
43 #include "confirmcommentdialog.h" 43 #include "confirmcommentdialog.h"
44 #include "incomingdialog.h" 44 #include "incomingdialog.h"
45 #include "settingsdialog.h" 45 #include "settingsdialog.h"
46 #include "moreinformationdialog.h"
46 #include "version.h" 47 #include "version.h"
47 48
48 49
49 MainWindow::MainWindow(QString myDirPath) : 50 MainWindow::MainWindow(QString myDirPath) :
50 m_myDirPath(myDirPath), 51 m_myDirPath(myDirPath),
1527 if (!m_fsWatcherSuspended) { 1528 if (!m_fsWatcherSuspended) {
1528 hgStat(); 1529 hgStat();
1529 } 1530 }
1530 } 1531 }
1531 1532
1533 QString MainWindow::format1(QString head)
1534 {
1535 return QString("<qt><h3>%1</h3></qt>").arg(head);
1536 }
1537
1532 QString MainWindow::format3(QString head, QString intro, QString code) 1538 QString MainWindow::format3(QString head, QString intro, QString code)
1533 { 1539 {
1534 code = xmlEncode(code).replace("\n", "<br>") 1540 code = xmlEncode(code).replace("\n", "<br>")
1535 #ifndef Q_OS_WIN32 1541 #ifndef Q_OS_WIN32
1536 // The hard hyphen comes out funny on Windows 1542 // The hard hyphen comes out funny on Windows
1594 } else if (n == 0) { 1600 } else if (n == 0) {
1595 report = tr("No changes to pull"); 1601 report = tr("No changes to pull");
1596 } else { 1602 } else {
1597 report = tr("Pull complete"); 1603 report = tr("Pull complete");
1598 } 1604 }
1605
1606 runner->hide();
1607
1608 MoreInformationDialog::information(this, tr("Pull complete"),
1609 format1(report), output);
1610
1611 /*!!!
1599 report = format3(report, tr("The pull command output was:"), output); 1612 report = format3(report, tr("The pull command output was:"), output);
1600 runner->hide(); 1613
1601 1614 //!!! and something about updating?
1602 //!!! and something about updating
1603 1615
1604 QMessageBox::information(this, "Pull complete", report); 1616 QMessageBox::information(this, "Pull complete", report);
1617 */
1605 } 1618 }
1606 1619
1607 void MainWindow::reportNewRemoteHeads(QString output) 1620 void MainWindow::reportNewRemoteHeads(QString output)
1608 { 1621 {
1609 bool headsAreLocal = false; 1622 bool headsAreLocal = false;