Mercurial > hg > easyhg
comparison src/mainwindow.cpp @ 542:7829da6abe97 fswatcher
Provide all tracked files to the fs watcher, so now we get updates properly -- requires moving the "what should we display?" logic for show-all-files toggle from main window to file status widget, but it's probably better there anyway
author | Chris Cannam |
---|---|
date | Tue, 14 Feb 2012 16:48:01 +0000 |
parents | 0a16db274f2c |
children | a220f99f1134 |
comparison
equal
deleted
inserted
replaced
541:0a16db274f2c | 542:7829da6abe97 |
---|---|
120 this, SLOT(showAllChanged())); | 120 this, SLOT(showAllChanged())); |
121 | 121 |
122 setUnifiedTitleAndToolBarOnMac(true); | 122 setUnifiedTitleAndToolBarOnMac(true); |
123 connectActions(); | 123 connectActions(); |
124 clearState(); | 124 clearState(); |
125 updateFsWatcher(); | |
126 enableDisableActions(); | 125 enableDisableActions(); |
127 | 126 |
128 if (m_firstStart) { | 127 if (m_firstStart) { |
129 startupDialog(); | 128 startupDialog(); |
130 } | 129 } |
252 | 251 |
253 void MainWindow::hgStat() | 252 void MainWindow::hgStat() |
254 { | 253 { |
255 QStringList params; | 254 QStringList params; |
256 | 255 |
257 if (m_showAllFiles) { | 256 // We always stat all files, regardless of whether we're showing |
258 params << "stat" << "-A"; | 257 // them all, because we need them for the filesystem monitor |
259 } else { | 258 params << "stat" << "-A"; |
260 params << "stat" << "-ardum"; | |
261 } | |
262 | 259 |
263 m_lastStatOutput = ""; | 260 m_lastStatOutput = ""; |
264 | 261 |
265 // We're about to do a stat, so we can silently bring ourselves | 262 // We're about to do a stat, so we can silently bring ourselves |
266 // up-to-date on any file changes to this point | 263 // up-to-date on any file changes to this point |
1427 } | 1424 } |
1428 | 1425 |
1429 if (result) { | 1426 if (result) { |
1430 enableDisableActions(); | 1427 enableDisableActions(); |
1431 clearState(); | 1428 clearState(); |
1432 updateFsWatcher(); | |
1433 hgQueryPaths(); | 1429 hgQueryPaths(); |
1434 done = true; | 1430 done = true; |
1435 } | 1431 } |
1436 | 1432 |
1437 } else { | 1433 } else { |
1513 void MainWindow::open(QString local) | 1509 void MainWindow::open(QString local) |
1514 { | 1510 { |
1515 if (openLocal(local)) { | 1511 if (openLocal(local)) { |
1516 enableDisableActions(); | 1512 enableDisableActions(); |
1517 clearState(); | 1513 clearState(); |
1518 updateFsWatcher(); | |
1519 hgQueryPaths(); | 1514 hgQueryPaths(); |
1520 } | 1515 } |
1521 } | 1516 } |
1522 | 1517 |
1523 bool MainWindow::complainAboutFilePath(QString arg) | 1518 bool MainWindow::complainAboutFilePath(QString arg) |