Mercurial > hg > easyhg
comparison mainwindow.cpp @ 202:3d4291d4226c
* Treat command failure on hg heads as a success, so that following actions happen properly (hg heads fails on empty repo)
* Hide no-modifications-yet label when widget is first created, show it only if it would actually be true
* Set directory name to window title
* Various textual fixes
author | Chris Cannam |
---|---|
date | Tue, 04 Jan 2011 14:31:22 +0000 |
parents | 8c8c04bdf0fa |
children | 583faa8dadb6 |
comparison
equal
deleted
inserted
replaced
200:8c8c04bdf0fa | 202:3d4291d4226c |
---|---|
1511 // are no changes pending | 1511 // are no changes pending |
1512 if (output.trimmed() == "") showIncoming(""); | 1512 if (output.trimmed() == "") showIncoming(""); |
1513 return; | 1513 return; |
1514 case ACT_QUERY_HEADS: | 1514 case ACT_QUERY_HEADS: |
1515 // fails if repo is empty; we don't care (if there's a genuine | 1515 // fails if repo is empty; we don't care (if there's a genuine |
1516 // problem, something else will fail too). Need to do this, | 1516 // problem, something else will fail too). Pretend it |
1517 // otherwise empty repo state will not be reflected properly | 1517 // succeeded, so that any further actions that are contingent |
1518 // (since heads/log procedure never completes for empty repo) | 1518 // on the success of the heads query get carried out properly. |
1519 enableDisableActions(); | 1519 commandCompleted(action, ""); |
1520 return; | 1520 return; |
1521 case ACT_FOLDERDIFF: | 1521 case ACT_FOLDERDIFF: |
1522 case ACT_CHGSETDIFF: | 1522 case ACT_CHGSETDIFF: |
1523 // external program, unlikely to be anything useful in stderr | 1523 // external program, unlikely to be anything useful in stderr |
1524 // and some return with failure codes when something as basic | 1524 // and some return with failure codes when something as basic |
1883 } | 1883 } |
1884 | 1884 |
1885 void MainWindow::enableDisableActions() | 1885 void MainWindow::enableDisableActions() |
1886 { | 1886 { |
1887 DEBUG << "MainWindow::enableDisableActions" << endl; | 1887 DEBUG << "MainWindow::enableDisableActions" << endl; |
1888 | |
1889 QString dirname = QDir(workFolderPath).dirName(); | |
1890 if (dirname != "") { | |
1891 setWindowTitle(tr("EasyMercurial: %1").arg(dirname)); | |
1892 } else { | |
1893 setWindowTitle(tr("EasyMercurial")); | |
1894 } | |
1888 | 1895 |
1889 //!!! should also do things like set the status texts for the | 1896 //!!! should also do things like set the status texts for the |
1890 //!!! actions appropriately by context | 1897 //!!! actions appropriately by context |
1891 | 1898 |
1892 QDir localRepoDir; | 1899 QDir localRepoDir; |