Mercurial > hg > easyhg
comparison mainwindow.cpp @ 340:bb189827f6d1
Disable "Show All Files" when there's no repo; refuse to run Hg commands without working dir; increase first-start window size a bit
author | Chris Cannam |
---|---|
date | Tue, 15 Mar 2011 12:00:31 +0000 |
parents | 8b244f3b3111 |
children | 1fc2e0269ae0 435b6f0b6eeb |
comparison
equal
deleted
inserted
replaced
339:8b244f3b3111 | 340:bb189827f6d1 |
---|---|
2252 void MainWindow::enableDisableActions() | 2252 void MainWindow::enableDisableActions() |
2253 { | 2253 { |
2254 DEBUG << "MainWindow::enableDisableActions" << endl; | 2254 DEBUG << "MainWindow::enableDisableActions" << endl; |
2255 | 2255 |
2256 QString dirname = QDir(m_workFolderPath).dirName(); | 2256 QString dirname = QDir(m_workFolderPath).dirName(); |
2257 if (dirname != "") { | 2257 |
2258 if (m_workFolderPath != "") { // dirname of "" is ".", so test path instead | |
2258 setWindowTitle(tr("EasyMercurial: %1").arg(dirname)); | 2259 setWindowTitle(tr("EasyMercurial: %1").arg(dirname)); |
2259 } else { | 2260 } else { |
2260 setWindowTitle(tr("EasyMercurial")); | 2261 setWindowTitle(tr("EasyMercurial")); |
2261 } | 2262 } |
2262 | 2263 |
2596 { | 2597 { |
2597 m_workFolderPath = ""; | 2598 m_workFolderPath = ""; |
2598 } | 2599 } |
2599 | 2600 |
2600 QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint(); | 2601 QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint(); |
2601 QSize size = settings.value("size", QSize(400, 400)).toSize(); | 2602 QSize size = settings.value("size", QSize(550, 550)).toSize(); |
2602 m_firstStart = settings.value("firststart", QVariant(true)).toBool(); | 2603 m_firstStart = settings.value("firststart", QVariant(true)).toBool(); |
2603 | 2604 |
2604 resize(size); | 2605 resize(size); |
2605 move(pos); | 2606 move(pos); |
2606 } | 2607 } |