comparison mainwindow.cpp @ 145:644bd31e8301

* Include the uncommitted item in general graph layout (in case it is not at the head, when other items will need to avoid it)
author Chris Cannam
date Wed, 01 Dec 2010 17:41:14 +0000
parents f61f032b06f9
children 465c8d51c6d5
comparison
equal deleted inserted replaced
143:f61f032b06f9 145:644bd31e8301
738 // cancelled 738 // cancelled
739 done = true; 739 done = true;
740 } 740 }
741 741
742 delete d; 742 delete d;
743 }
744 }
745
746 void MainWindow::open(QString local)
747 {
748 if (openLocal(local)) {
749 enableDisableActions();
750 clearState();
751 hgQueryPaths();
743 } 752 }
744 } 753 }
745 754
746 bool MainWindow::complainAboutFilePath(QString arg) 755 bool MainWindow::complainAboutFilePath(QString arg)
747 { 756 {
1433 //!!! should also do things like set the status texts for the 1442 //!!! should also do things like set the status texts for the
1434 //!!! actions appropriately by context 1443 //!!! actions appropriately by context
1435 1444
1436 QDir localRepoDir; 1445 QDir localRepoDir;
1437 QDir workFolderDir; 1446 QDir workFolderDir;
1438 bool workFolderExist; 1447 bool workFolderExist = true;
1439 bool localRepoExist; 1448 bool localRepoExist = true;
1440 1449
1441 remoteRepoActionsEnabled = true; 1450 remoteRepoActionsEnabled = true;
1442 if (remoteRepoPath.isEmpty()) { 1451 if (remoteRepoPath.isEmpty()) {
1443 remoteRepoActionsEnabled = false; 1452 remoteRepoActionsEnabled = false;
1444 } 1453 }
1542 hgMergeAct->setEnabled(localRepoActionsEnabled && canMerge); 1551 hgMergeAct->setEnabled(localRepoActionsEnabled && canMerge);
1543 hgUpdateAct->setEnabled(localRepoActionsEnabled && canUpdate); 1552 hgUpdateAct->setEnabled(localRepoActionsEnabled && canUpdate);
1544 1553
1545 QStringList ids; 1554 QStringList ids;
1546 foreach (Changeset *cs, currentParents) ids.push_back(cs->id()); 1555 foreach (Changeset *cs, currentParents) ids.push_back(cs->id());
1547 hgTabs->setCurrent(ids); 1556 hgTabs->setCurrent(ids, hgTabs->canCommit());
1548 hgTabs->showUncommittedChanges(hgTabs->canCommit());
1549 1557
1550 // Set the state field on the file status widget 1558 // Set the state field on the file status widget
1551 1559
1552 QString branchText; 1560 QString branchText;
1553 if (currentBranch == "" || currentBranch == "default") { 1561 if (currentBranch == "" || currentBranch == "default") {