Mercurial > hg > easyhg
diff 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 |
line wrap: on
line diff
--- a/mainwindow.cpp Tue Jan 04 12:42:28 2011 +0000 +++ b/mainwindow.cpp Tue Jan 04 14:31:22 2011 +0000 @@ -1513,10 +1513,10 @@ return; case ACT_QUERY_HEADS: // fails if repo is empty; we don't care (if there's a genuine - // problem, something else will fail too). Need to do this, - // otherwise empty repo state will not be reflected properly - // (since heads/log procedure never completes for empty repo) - enableDisableActions(); + // problem, something else will fail too). Pretend it + // succeeded, so that any further actions that are contingent + // on the success of the heads query get carried out properly. + commandCompleted(action, ""); return; case ACT_FOLDERDIFF: case ACT_CHGSETDIFF: @@ -1886,6 +1886,13 @@ { DEBUG << "MainWindow::enableDisableActions" << endl; + QString dirname = QDir(workFolderPath).dirName(); + if (dirname != "") { + setWindowTitle(tr("EasyMercurial: %1").arg(dirname)); + } else { + setWindowTitle(tr("EasyMercurial")); + } + //!!! should also do things like set the status texts for the //!!! actions appropriately by context