Merged refactor
Added missing status UPDATED_BY_MERGE Fixed parsing of file status FossilOrigin-Name: f82fab41453e6ccf28c60e89ce567635ffab25a3
This commit is contained in:
commit
b796cde81b
21
manifest
21
manifest
@ -1,5 +1,5 @@
|
||||
C Closed\sbranch
|
||||
D 2015-04-30T16:51:00.874
|
||||
C Merged\srefactor\nAdded\smissing\sstatus\sUPDATED_BY_MERGE\s\nFixed\sparsing\sof\sfile\sstatus
|
||||
D 2015-04-30T17:43:40.786
|
||||
F .travis.yml 77966888a81c4ceee1fcc79bce842c9667ad8a35
|
||||
F debian/changelog eb4304dfcb6bb66850ec740838090eb50ce1249b
|
||||
F debian/compat b6abd567fa79cbe0196d093a067271361dc6ca8b
|
||||
@ -200,14 +200,14 @@ F src/Fossil.cpp b54d136f05764535636da04bcc5f60b2eb97e5b6
|
||||
F src/Fossil.h e46ec6cdb5c23a34176050fbd90e561ac87c07f9
|
||||
F src/LoggedProcess.cpp 2a1e5c94bc1e57c8984563e66c210e43a14dc60c
|
||||
F src/LoggedProcess.h 85df7c635c807a5a0e8c4763f17a0752aaff7261
|
||||
F src/MainWindow.cpp f6ffb8c6d1283a812084094426d51a5ea601fa35
|
||||
F src/MainWindow.h 970c7e42d07499a86b1f6cc5cbe3921e1fc1f9e3
|
||||
F src/MainWindow.cpp b8d87316df5ca82d6ac9bb0960304ab39489a91f
|
||||
F src/MainWindow.h d8d376f2efbf47c7a0241bb574994dbcf92300fb
|
||||
F src/SettingsDialog.cpp a46cff5e5dd425e3dbdd15632abfd5829f5562b4
|
||||
F src/SettingsDialog.h 4e2790f581e991c744ae9f86580f1972b8c7ff43
|
||||
F src/Utils.cpp f78728e0817b1db23007ba0d2c5c26980ee7ebca
|
||||
F src/Utils.h 8ad68bd227bd999eb6ea92a70bb4be2d6788d912
|
||||
F src/Workspace.cpp a1ca37e803d6bccb9ddf1f80df66148438e6ea21
|
||||
F src/Workspace.h 681e3b434455c21613022c95d182ccb35879fc68
|
||||
F src/Workspace.cpp 199ec5f5aee9e8d9997617aa879cb9a14dafcb1b
|
||||
F src/Workspace.h 9f1d34320abb378ae5a6e3360f8c8a5949029b88
|
||||
F src/main.cpp 2ac8badc2a63fa123ceae53382ce24cfe1b5a54b
|
||||
F tools/git-push.sh 62cc58434cae5b7bcd6bd9d4cce8b08739f31cd7 x
|
||||
F tools/pack.sh d7f38a498c4e9327fecd6a6e5ac27be270d43008 x
|
||||
@ -215,10 +215,9 @@ F ui/BrowserWidget.ui 5ad98b13773afadb20a1a2c22148aaebe5dbd95d
|
||||
F ui/CloneDialog.ui 4886e7d4f258ea8b852b5eefc860396e35145712
|
||||
F ui/CommitDialog.ui 6200f6cabdcf40a20812e811be28e0793f82516f
|
||||
F ui/FileActionDialog.ui 89bb4dc2d0b8adcd41adcb11ec65f2028a09a12d
|
||||
F ui/MainWindow.ui 8677f5c8bca5bf7561d5f64bfdd0cef5157c6ac7
|
||||
F ui/MainWindow.ui c02f609b7f3a33c9be5f420591466ae5e398a988
|
||||
F ui/SettingsDialog.ui 2b7c2870e0054b0f4106f495d85d02c0b814df8b
|
||||
P c5152d66a73c5f374ae24fa61c7c9e721e7bb821
|
||||
R ea2eae273fa42edf7d181d3dcc962763
|
||||
T +closed *
|
||||
P e54f1cacad13f429891d89053a208cd340386a3b 54059126aee6bb232373c1f134cc07ea0a6f4cca
|
||||
R c8caf9794c01c2e9f28e7aab2d817e71
|
||||
U kostas
|
||||
Z 587ab2b348930a050cf8c57e671a5c0b
|
||||
Z 2db0b96e08403561e015298ad9ef24fd
|
||||
|
@ -1 +1 @@
|
||||
e54f1cacad13f429891d89053a208cd340386a3b
|
||||
f82fab41453e6ccf28c60e89ce567635ffab25a3
|
@ -76,19 +76,19 @@ MainWindow::MainWindow(Settings &_settings, QWidget *parent, QString *workspaceP
|
||||
QAction *separator = new QAction(this);
|
||||
separator->setSeparator(true);
|
||||
|
||||
// TableView
|
||||
ui->tableView->setModel(&getWorkspace().getFileModel());
|
||||
// fileTableView
|
||||
ui->fileTableView->setModel(&getWorkspace().getFileModel());
|
||||
|
||||
ui->tableView->addAction(ui->actionDiff);
|
||||
ui->tableView->addAction(ui->actionHistory);
|
||||
ui->tableView->addAction(ui->actionOpenFile);
|
||||
ui->tableView->addAction(ui->actionOpenContaining);
|
||||
ui->tableView->addAction(separator);
|
||||
ui->tableView->addAction(ui->actionAdd);
|
||||
ui->tableView->addAction(ui->actionRevert);
|
||||
ui->tableView->addAction(ui->actionRename);
|
||||
ui->tableView->addAction(ui->actionDelete);
|
||||
connect( ui->tableView,
|
||||
ui->fileTableView->addAction(ui->actionDiff);
|
||||
ui->fileTableView->addAction(ui->actionHistory);
|
||||
ui->fileTableView->addAction(ui->actionOpenFile);
|
||||
ui->fileTableView->addAction(ui->actionOpenContaining);
|
||||
ui->fileTableView->addAction(separator);
|
||||
ui->fileTableView->addAction(ui->actionAdd);
|
||||
ui->fileTableView->addAction(ui->actionRevert);
|
||||
ui->fileTableView->addAction(ui->actionRename);
|
||||
ui->fileTableView->addAction(ui->actionDelete);
|
||||
connect( ui->fileTableView,
|
||||
SIGNAL( dragOutEvent() ),
|
||||
SLOT( onFileViewDragOut() ),
|
||||
Qt::DirectConnection );
|
||||
@ -99,36 +99,36 @@ MainWindow::MainWindow(Settings &_settings, QWidget *parent, QString *workspaceP
|
||||
getWorkspace().getFileModel().horizontalHeaderItem(COLUMN_STATUS)->setTextAlignment(Qt::AlignCenter);
|
||||
|
||||
// Needed on OSX as the preset value from the GUI editor is not always reflected
|
||||
ui->tableView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
|
||||
ui->fileTableView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
|
||||
ui->tableView->horizontalHeader()->setMovable(true);
|
||||
ui->fileTableView->horizontalHeader()->setMovable(true);
|
||||
#else
|
||||
ui->tableView->horizontalHeader()->setSectionsMovable(true);
|
||||
ui->fileTableView->horizontalHeader()->setSectionsMovable(true);
|
||||
#endif
|
||||
ui->tableView->horizontalHeader()->setStretchLastSection(true);
|
||||
ui->fileTableView->horizontalHeader()->setStretchLastSection(true);
|
||||
|
||||
// TreeView
|
||||
ui->treeView->setModel(&getWorkspace().getDirModel());
|
||||
connect( ui->treeView->selectionModel(),
|
||||
// workspaceTreeView
|
||||
ui->workspaceTreeView->setModel(&getWorkspace().getDirModel());
|
||||
connect( ui->workspaceTreeView->selectionModel(),
|
||||
SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection &) ),
|
||||
SLOT( onTreeViewSelectionChanged(const QItemSelection &, const QItemSelection &) ),
|
||||
SLOT( onWorkspaceTreeViewSelectionChanged(const QItemSelection &, const QItemSelection &) ),
|
||||
Qt::DirectConnection );
|
||||
|
||||
ui->treeView->addAction(ui->actionCommit);
|
||||
ui->treeView->addAction(ui->actionOpenFolder);
|
||||
ui->treeView->addAction(ui->actionAdd);
|
||||
ui->treeView->addAction(ui->actionRevert);
|
||||
ui->treeView->addAction(ui->actionDelete);
|
||||
ui->treeView->addAction(separator);
|
||||
ui->treeView->addAction(ui->actionRenameFolder);
|
||||
ui->treeView->addAction(ui->actionOpenFolder);
|
||||
ui->workspaceTreeView->addAction(ui->actionCommit);
|
||||
ui->workspaceTreeView->addAction(ui->actionOpenFolder);
|
||||
ui->workspaceTreeView->addAction(ui->actionAdd);
|
||||
ui->workspaceTreeView->addAction(ui->actionRevert);
|
||||
ui->workspaceTreeView->addAction(ui->actionDelete);
|
||||
ui->workspaceTreeView->addAction(separator);
|
||||
ui->workspaceTreeView->addAction(ui->actionRenameFolder);
|
||||
ui->workspaceTreeView->addAction(ui->actionOpenFolder);
|
||||
|
||||
// StashView
|
||||
ui->tableViewStash->setModel(&getWorkspace().getStashModel());
|
||||
ui->tableViewStash->addAction(ui->actionApplyStash);
|
||||
ui->tableViewStash->addAction(ui->actionDiffStash);
|
||||
ui->tableViewStash->addAction(ui->actionDeleteStash);
|
||||
ui->tableViewStash->horizontalHeader()->setSortIndicatorShown(false);
|
||||
ui->stashTableView->setModel(&getWorkspace().getStashModel());
|
||||
ui->stashTableView->addAction(ui->actionApplyStash);
|
||||
ui->stashTableView->addAction(ui->actionDiffStash);
|
||||
ui->stashTableView->addAction(ui->actionDeleteStash);
|
||||
ui->stashTableView->horizontalHeader()->setSortIndicatorShown(false);
|
||||
|
||||
// Recent Workspaces
|
||||
// Locate a sequence of two separator actions in file menu
|
||||
@ -621,8 +621,8 @@ void MainWindow::updateDirView()
|
||||
|
||||
addPathToTree(*root, dir);
|
||||
}
|
||||
ui->treeView->expandToDepth(0);
|
||||
ui->treeView->sortByColumn(0, Qt::AscendingOrder);
|
||||
ui->workspaceTreeView->expandToDepth(0);
|
||||
ui->workspaceTreeView->sortByColumn(0, Qt::AscendingOrder);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -641,6 +641,7 @@ void MainWindow::updateFileView()
|
||||
{ WorkspaceFile::TYPE_RENAMED, tr("Renamed"), ":icons/icons/Button Reload-01.png" },
|
||||
{ WorkspaceFile::TYPE_MISSING, tr("Missing"), ":icons/icons/Button Help-01.png" },
|
||||
{ WorkspaceFile::TYPE_CONFLICTED, tr("Conflicted"), ":icons/icons/Button Blank Red-01.png" },
|
||||
{ WorkspaceFile::TYPE_MERGED, tr("Merged"), ":icons/icons/Button Blank Yellow-01.png" },
|
||||
};
|
||||
|
||||
QFileIconProvider icon_provider;
|
||||
@ -697,7 +698,7 @@ void MainWindow::updateFileView()
|
||||
++item_id;
|
||||
}
|
||||
|
||||
ui->tableView->resizeRowsToContents();
|
||||
ui->fileTableView->resizeRowsToContents();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -715,8 +716,8 @@ void MainWindow::updateStashView()
|
||||
item->setToolTip(it.key());
|
||||
getWorkspace().getStashModel().appendRow(item);
|
||||
}
|
||||
ui->tableViewStash->resizeColumnsToContents();
|
||||
ui->tableViewStash->resizeRowsToContents();
|
||||
ui->stashTableView->resizeColumnsToContents();
|
||||
ui->stashTableView->resizeRowsToContents();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -773,14 +774,14 @@ void MainWindow::applySettings()
|
||||
if(store->contains("Width"))
|
||||
{
|
||||
int width = store->value("Width").toInt();
|
||||
ui->tableView->setColumnWidth(i, width);
|
||||
ui->fileTableView->setColumnWidth(i, width);
|
||||
}
|
||||
|
||||
if(store->contains("Index"))
|
||||
{
|
||||
int index = store->value("Index").toInt();
|
||||
int cur_index = ui->tableView->horizontalHeader()->visualIndex(i);
|
||||
ui->tableView->horizontalHeader()->moveSection(cur_index, index);
|
||||
int cur_index = ui->fileTableView->horizontalHeader()->visualIndex(i);
|
||||
ui->fileTableView->horizontalHeader()->moveSection(cur_index, index);
|
||||
}
|
||||
|
||||
}
|
||||
@ -816,11 +817,11 @@ void MainWindow::applySettings()
|
||||
ui->actionViewAsList->setChecked(store->value("ViewAsList").toBool());
|
||||
viewMode = store->value("ViewAsList").toBool()? VIEWMODE_LIST : VIEWMODE_TREE;
|
||||
}
|
||||
ui->treeView->setVisible(viewMode == VIEWMODE_TREE);
|
||||
ui->workspaceTreeView->setVisible(viewMode == VIEWMODE_TREE);
|
||||
|
||||
if(store->contains("ViewStash"))
|
||||
ui->actionViewStash->setChecked(store->value("ViewStash").toBool());
|
||||
ui->tableViewStash->setVisible(ui->actionViewStash->isChecked());
|
||||
ui->stashTableView->setVisible(ui->actionViewStash->isChecked());
|
||||
|
||||
}
|
||||
|
||||
@ -845,8 +846,8 @@ void MainWindow::updateSettings()
|
||||
for(int i=0; i<getWorkspace().getFileModel().columnCount(); ++i)
|
||||
{
|
||||
store->setArrayIndex(i);
|
||||
store->setValue("Width", ui->tableView->columnWidth(i));
|
||||
int index = ui->tableView->horizontalHeader()->visualIndex(i);
|
||||
store->setValue("Width", ui->fileTableView->columnWidth(i));
|
||||
int index = ui->fileTableView->horizontalHeader()->visualIndex(i);
|
||||
store->setValue("Index", index);
|
||||
}
|
||||
store->endArray();
|
||||
@ -868,8 +869,8 @@ void MainWindow::selectRootDir()
|
||||
{
|
||||
if(viewMode==VIEWMODE_TREE)
|
||||
{
|
||||
QModelIndex root_index = ui->treeView->model()->index(0, 0);
|
||||
ui->treeView->selectionModel()->select(root_index, QItemSelectionModel::Select);
|
||||
QModelIndex root_index = ui->workspaceTreeView->model()->index(0, 0);
|
||||
ui->workspaceTreeView->selectionModel()->select(root_index, QItemSelectionModel::Select);
|
||||
}
|
||||
}
|
||||
|
||||
@ -894,7 +895,7 @@ void MainWindow::fossilBrowse(const QString &fossilUrl)
|
||||
//------------------------------------------------------------------------------
|
||||
void MainWindow::getSelectionFilenames(QStringList &filenames, int includeMask, bool allIfEmpty)
|
||||
{
|
||||
if(QApplication::focusWidget() == ui->treeView)
|
||||
if(QApplication::focusWidget() == ui->workspaceTreeView)
|
||||
getDirViewSelection(filenames, includeMask, allIfEmpty);
|
||||
else
|
||||
getFileViewSelection(filenames, includeMask, allIfEmpty);
|
||||
@ -904,7 +905,7 @@ void MainWindow::getSelectionFilenames(QStringList &filenames, int includeMask,
|
||||
void MainWindow::getSelectionPaths(stringset_t &paths)
|
||||
{
|
||||
// Determine the directories selected
|
||||
QModelIndexList selection = ui->treeView->selectionModel()->selectedIndexes();
|
||||
QModelIndexList selection = ui->workspaceTreeView->selectionModel()->selectedIndexes();
|
||||
for(QModelIndexList::iterator mi_it = selection.begin(); mi_it!=selection.end(); ++mi_it)
|
||||
{
|
||||
const QModelIndex &mi = *mi_it;
|
||||
@ -933,7 +934,7 @@ void MainWindow::getDirViewSelection(QStringList &filenames, int includeMask, bo
|
||||
// Determine the directories selected
|
||||
stringset_t paths;
|
||||
|
||||
QModelIndexList selection = ui->treeView->selectionModel()->selectedIndexes();
|
||||
QModelIndexList selection = ui->workspaceTreeView->selectionModel()->selectedIndexes();
|
||||
if(!(selection.empty() && allIfEmpty))
|
||||
{
|
||||
getSelectionPaths(paths);
|
||||
@ -977,12 +978,12 @@ void MainWindow::getDirViewSelection(QStringList &filenames, int includeMask, bo
|
||||
//------------------------------------------------------------------------------
|
||||
void MainWindow::getFileViewSelection(QStringList &filenames, int includeMask, bool allIfEmpty)
|
||||
{
|
||||
QModelIndexList selection = ui->tableView->selectionModel()->selectedIndexes();
|
||||
QModelIndexList selection = ui->fileTableView->selectionModel()->selectedIndexes();
|
||||
if(selection.empty() && allIfEmpty)
|
||||
{
|
||||
ui->tableView->selectAll();
|
||||
selection = ui->tableView->selectionModel()->selectedIndexes();
|
||||
ui->tableView->clearSelection();
|
||||
ui->fileTableView->selectAll();
|
||||
selection = ui->fileTableView->selectionModel()->selectedIndexes();
|
||||
ui->fileTableView->clearSelection();
|
||||
}
|
||||
|
||||
for(QModelIndexList::iterator mi_it = selection.begin(); mi_it!=selection.end(); ++mi_it)
|
||||
@ -1010,12 +1011,12 @@ void MainWindow::getFileViewSelection(QStringList &filenames, int includeMask, b
|
||||
//------------------------------------------------------------------------------
|
||||
void MainWindow::getStashViewSelection(QStringList &stashNames, bool allIfEmpty)
|
||||
{
|
||||
QModelIndexList selection = ui->tableViewStash->selectionModel()->selectedIndexes();
|
||||
QModelIndexList selection = ui->stashTableView->selectionModel()->selectedIndexes();
|
||||
if(selection.empty() && allIfEmpty)
|
||||
{
|
||||
ui->tableViewStash->selectAll();
|
||||
selection = ui->tableViewStash->selectionModel()->selectedIndexes();
|
||||
ui->tableViewStash->clearSelection();
|
||||
ui->stashTableView->selectAll();
|
||||
selection = ui->stashTableView->selectionModel()->selectedIndexes();
|
||||
ui->stashTableView->clearSelection();
|
||||
}
|
||||
|
||||
for(QModelIndexList::iterator mi_it = selection.begin(); mi_it!=selection.end(); ++mi_it)
|
||||
@ -1103,7 +1104,7 @@ void MainWindow::on_actionHistory_triggered()
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void MainWindow::on_tableView_doubleClicked(const QModelIndex &/*index*/)
|
||||
void MainWindow::on_fileTableView_doubleClicked(const QModelIndex &/*index*/)
|
||||
{
|
||||
int action = settings.GetValue(FUEL_SETTING_FILE_DBLCLICK).toInt();
|
||||
if(action==FILE_DLBCLICK_ACTION_DIFF)
|
||||
@ -1259,7 +1260,7 @@ void MainWindow::on_actionDelete_triggered()
|
||||
void MainWindow::on_actionRevert_triggered()
|
||||
{
|
||||
QStringList modified_files;
|
||||
getSelectionFilenames(modified_files, WorkspaceFile::TYPE_EDITTED|WorkspaceFile::TYPE_ADDED|WorkspaceFile::TYPE_DELETED|WorkspaceFile::TYPE_MISSING|WorkspaceFile::TYPE_CONFLICTED);
|
||||
getSelectionFilenames(modified_files, WorkspaceFile::TYPE_MODIFIED);
|
||||
|
||||
if(modified_files.empty())
|
||||
return;
|
||||
@ -1502,7 +1503,7 @@ void MainWindow::on_actionViewIgnored_triggered()
|
||||
void MainWindow::on_actionViewAsList_triggered()
|
||||
{
|
||||
viewMode = ui->actionViewAsList->isChecked() ? VIEWMODE_LIST : VIEWMODE_TREE;
|
||||
ui->treeView->setVisible(viewMode == VIEWMODE_TREE);
|
||||
ui->workspaceTreeView->setVisible(viewMode == VIEWMODE_TREE);
|
||||
updateFileView();
|
||||
}
|
||||
|
||||
@ -1514,9 +1515,9 @@ QString MainWindow::getFossilHttpAddress()
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void MainWindow::onTreeViewSelectionChanged(const QItemSelection &/*selected*/, const QItemSelection &/*deselected*/)
|
||||
void MainWindow::onWorkspaceTreeViewSelectionChanged(const QItemSelection &/*selected*/, const QItemSelection &/*deselected*/)
|
||||
{
|
||||
QModelIndexList selection = ui->treeView->selectionModel()->selectedIndexes();
|
||||
QModelIndexList selection = ui->workspaceTreeView->selectionModel()->selectedIndexes();
|
||||
int num_selected = selection.count();
|
||||
|
||||
// Do not modify the selection if nothing is selected
|
||||
@ -1538,17 +1539,17 @@ void MainWindow::onTreeViewSelectionChanged(const QItemSelection &/*selected*/,
|
||||
//------------------------------------------------------------------------------
|
||||
void MainWindow::on_actionOpenFolder_triggered()
|
||||
{
|
||||
const QItemSelection &selection = ui->treeView->selectionModel()->selection();
|
||||
const QItemSelection &selection = ui->workspaceTreeView->selectionModel()->selection();
|
||||
|
||||
if(selection.indexes().count()!=1)
|
||||
return;
|
||||
|
||||
QModelIndex index = selection.indexes().at(0);
|
||||
on_treeView_doubleClicked(index);
|
||||
on_workspaceTreeView_doubleClicked(index);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void MainWindow::on_treeView_doubleClicked(const QModelIndex &index)
|
||||
void MainWindow::on_workspaceTreeView_doubleClicked(const QModelIndex &index)
|
||||
{
|
||||
QString target = getWorkspace().getDirModel().data(index, REPODIRMODEL_ROLE_PATH).toString();
|
||||
target = getCurrentWorkspace() + PATH_SEPARATOR + target;
|
||||
@ -1730,7 +1731,7 @@ QMenu * MainWindow::createPopupMenu()
|
||||
//------------------------------------------------------------------------------
|
||||
void MainWindow::on_actionViewStash_triggered()
|
||||
{
|
||||
ui->tableViewStash->setVisible(ui->actionViewStash->isChecked());
|
||||
ui->stashTableView->setVisible(ui->actionViewStash->isChecked());
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -1886,13 +1887,13 @@ void MainWindow::on_textBrowser_customContextMenuRequested(const QPoint &pos)
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void MainWindow::on_tableView_customContextMenuRequested(const QPoint &pos)
|
||||
void MainWindow::on_fileTableView_customContextMenuRequested(const QPoint &pos)
|
||||
{
|
||||
QPoint gpos = QCursor::pos();
|
||||
#ifdef Q_OS_WIN
|
||||
if(qApp->keyboardModifiers() & Qt::SHIFT)
|
||||
{
|
||||
ui->tableView->selectionModel()->select(ui->tableView->indexAt(pos), QItemSelectionModel::ClearAndSelect|QItemSelectionModel::Rows);
|
||||
ui->fileTableView->selectionModel()->select(ui->fileTableView->indexAt(pos), QItemSelectionModel::ClearAndSelect|QItemSelectionModel::Rows);
|
||||
QStringList fnames;
|
||||
getSelectionFilenames(fnames);
|
||||
|
||||
@ -1910,7 +1911,7 @@ void MainWindow::on_tableView_customContextMenuRequested(const QPoint &pos)
|
||||
#endif
|
||||
{
|
||||
QMenu *menu = new QMenu(this);
|
||||
menu->addActions(ui->tableView->actions());
|
||||
menu->addActions(ui->fileTableView->actions());
|
||||
menu->popup(gpos);
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ private slots:
|
||||
// Manual slots.
|
||||
// Use a different naming scheme to prevent warnings from Qt's automatic signaling
|
||||
void onOpenRecent();
|
||||
void onTreeViewSelectionChanged(const class QItemSelection &selected, const class QItemSelection &deselected);
|
||||
void onWorkspaceTreeViewSelectionChanged(const class QItemSelection &selected, const class QItemSelection &deselected);
|
||||
void onFileViewDragOut();
|
||||
void onAbort();
|
||||
|
||||
@ -79,8 +79,8 @@ private slots:
|
||||
void on_actionTimeline_triggered();
|
||||
void on_actionHistory_triggered();
|
||||
void on_actionClearLog_triggered();
|
||||
void on_tableView_doubleClicked(const QModelIndex &index);
|
||||
void on_treeView_doubleClicked(const QModelIndex &index);
|
||||
void on_fileTableView_doubleClicked(const QModelIndex &index);
|
||||
void on_workspaceTreeView_doubleClicked(const QModelIndex &index);
|
||||
void on_actionOpenFile_triggered();
|
||||
void on_actionPush_triggered();
|
||||
void on_actionPull_triggered();
|
||||
@ -111,7 +111,7 @@ private slots:
|
||||
void on_actionDeleteStash_triggered();
|
||||
void on_actionDiffStash_triggered();
|
||||
void on_textBrowser_customContextMenuRequested(const QPoint &pos);
|
||||
void on_tableView_customContextMenuRequested(const QPoint &pos);
|
||||
void on_fileTableView_customContextMenuRequested(const QPoint &pos);
|
||||
|
||||
private:
|
||||
class MainWinUICallback : public UICallback
|
||||
|
@ -116,8 +116,13 @@ void Workspace::scanWorkspace(bool scanLocal, bool scanIgnored, bool scanModifie
|
||||
if(line.length()==0)
|
||||
continue;
|
||||
|
||||
QString status_text = line.left(10).trimmed();
|
||||
QString fname = line.right(line.length() - 10).trimmed();
|
||||
int space_index = line.indexOf(' ');
|
||||
if(space_index==-1)
|
||||
continue;
|
||||
|
||||
//QString status_text = line.left(10).trimmed();
|
||||
QString status_text = line.left(space_index);
|
||||
QString fname = line.right(line.length() - space_index).trimmed();
|
||||
WorkspaceFile::Type type = WorkspaceFile::TYPE_UNKNOWN;
|
||||
|
||||
// Generate a RepoFile for all non-existant fossil files
|
||||
@ -144,6 +149,8 @@ void Workspace::scanWorkspace(bool scanLocal, bool scanIgnored, bool scanModifie
|
||||
type = WorkspaceFile::TYPE_UNCHANGED;
|
||||
else if(status_text=="CONFLICT")
|
||||
type = WorkspaceFile::TYPE_CONFLICTED;
|
||||
else if(status_text=="UPDATED_BY_MERGE")
|
||||
type = WorkspaceFile::TYPE_MERGED;
|
||||
|
||||
// Filter unwanted file types
|
||||
if( ((type & WorkspaceFile::TYPE_MODIFIED) && !scanModified) ||
|
||||
|
@ -23,7 +23,8 @@ struct WorkspaceFile
|
||||
TYPE_MISSING = 1<<5,
|
||||
TYPE_RENAMED = 1<<6,
|
||||
TYPE_CONFLICTED = 1<<7,
|
||||
TYPE_MODIFIED = TYPE_EDITTED|TYPE_ADDED|TYPE_DELETED|TYPE_MISSING|TYPE_RENAMED|TYPE_CONFLICTED,
|
||||
TYPE_MERGED = 1<<8,
|
||||
TYPE_MODIFIED = TYPE_EDITTED|TYPE_ADDED|TYPE_DELETED|TYPE_MISSING|TYPE_RENAMED|TYPE_CONFLICTED|TYPE_MERGED,
|
||||
TYPE_REPO = TYPE_UNCHANGED|TYPE_MODIFIED,
|
||||
TYPE_ALL = TYPE_UNKNOWN|TYPE_REPO
|
||||
};
|
||||
|
@ -17,7 +17,7 @@
|
||||
<string>Fuel</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Battery-01.png</normaloff>:/icons/icons/Battery-01.png</iconset>
|
||||
</property>
|
||||
<property name="unifiedTitleAndToolBarOnMac">
|
||||
@ -58,7 +58,7 @@
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="QTreeView" name="treeView">
|
||||
<widget class="QTreeView" name="workspaceTreeView">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>20</horstretch>
|
||||
@ -87,7 +87,7 @@
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="FileTableView" name="tableView">
|
||||
<widget class="FileTableView" name="fileTableView">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>80</horstretch>
|
||||
@ -140,7 +140,7 @@
|
||||
<number>30</number>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QTableView" name="tableViewStash">
|
||||
<widget class="QTableView" name="stashTableView">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>20</horstretch>
|
||||
@ -356,7 +356,7 @@
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
<action name="actionRefresh">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Button Refresh-01.png</normaloff>:/icons/icons/Button Refresh-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -374,7 +374,7 @@
|
||||
</action>
|
||||
<action name="actionCommit">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Save-01.png</normaloff>:/icons/icons/Save-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -392,7 +392,7 @@
|
||||
</action>
|
||||
<action name="actionDiff">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Document Copy-01.png</normaloff>:/icons/icons/Document Copy-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -410,7 +410,7 @@
|
||||
</action>
|
||||
<action name="actionAdd">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/File New-01.png</normaloff>:/icons/icons/File New-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -428,7 +428,7 @@
|
||||
</action>
|
||||
<action name="actionDelete">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/File Delete-01.png</normaloff>:/icons/icons/File Delete-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -446,7 +446,7 @@
|
||||
</action>
|
||||
<action name="actionNewRepository">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Document Blank-01.png</normaloff>:/icons/icons/Document Blank-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -464,7 +464,7 @@
|
||||
</action>
|
||||
<action name="actionOpenRepository">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/My Documents-01.png</normaloff>:/icons/icons/My Documents-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -496,7 +496,7 @@
|
||||
</action>
|
||||
<action name="actionCloneRepository">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/My Websites-01.png</normaloff>:/icons/icons/My Websites-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -508,7 +508,7 @@
|
||||
</action>
|
||||
<action name="actionPush">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Button Upload-01.png</normaloff>:/icons/icons/Button Upload-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -526,7 +526,7 @@
|
||||
</action>
|
||||
<action name="actionPull">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Button Download-01.png</normaloff>:/icons/icons/Button Download-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -544,7 +544,7 @@
|
||||
</action>
|
||||
<action name="actionRename">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/File Open-01.png</normaloff>:/icons/icons/File Open-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -562,7 +562,7 @@
|
||||
</action>
|
||||
<action name="actionQuit">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Button Turn Off-01.png</normaloff>:/icons/icons/Button Turn Off-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -583,7 +583,7 @@
|
||||
</action>
|
||||
<action name="actionHistory">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/File History-01.png</normaloff>:/icons/icons/File History-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -604,7 +604,7 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Network MAC-01.png</normaloff>:/icons/icons/Network MAC-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -619,7 +619,7 @@
|
||||
</action>
|
||||
<action name="actionRevert">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Document-Revert-icon.png</normaloff>:/icons/icons/Document-Revert-icon.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -634,7 +634,7 @@
|
||||
</action>
|
||||
<action name="actionClearLog">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Text Edit.png</normaloff>:/icons/icons/Text Edit.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -649,7 +649,7 @@
|
||||
</action>
|
||||
<action name="actionTimeline">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Clock-01.png</normaloff>:/icons/icons/Clock-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -664,7 +664,7 @@
|
||||
</action>
|
||||
<action name="actionOpenFile">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Document-01.png</normaloff>:/icons/icons/Document-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -682,7 +682,7 @@
|
||||
</action>
|
||||
<action name="actionOpenContaining">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Folder-01.png</normaloff>:/icons/icons/Folder-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -700,7 +700,7 @@
|
||||
</action>
|
||||
<action name="actionUndo">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Button Reload-01.png</normaloff>:/icons/icons/Button Reload-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -718,7 +718,7 @@
|
||||
</action>
|
||||
<action name="actionAbout">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Battery-01.png</normaloff>:/icons/icons/Battery-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -733,7 +733,7 @@
|
||||
</action>
|
||||
<action name="actionUpdate">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Button Play-01.png</normaloff>:/icons/icons/Button Play-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -751,7 +751,7 @@
|
||||
</action>
|
||||
<action name="actionSettings">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Gear-01.png</normaloff>:/icons/icons/Gear-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -839,7 +839,7 @@
|
||||
</action>
|
||||
<action name="actionOpenFolder">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Folder-01.png</normaloff>:/icons/icons/Folder-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -854,7 +854,7 @@
|
||||
</action>
|
||||
<action name="actionRenameFolder">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Folder Open-01.png</normaloff>:/icons/icons/Folder Open-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -869,7 +869,7 @@
|
||||
</action>
|
||||
<action name="actionNewStash">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Folder Add-01.png</normaloff>:/icons/icons/Folder Add-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -881,7 +881,7 @@
|
||||
</action>
|
||||
<action name="actionApplyStash">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Folder Open-01.png</normaloff>:/icons/icons/Folder Open-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -913,7 +913,7 @@
|
||||
</action>
|
||||
<action name="actionDeleteStash">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Folder Delete-01.png</normaloff>:/icons/icons/Folder Delete-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -922,7 +922,7 @@
|
||||
</action>
|
||||
<action name="actionDiffStash">
|
||||
<property name="icon">
|
||||
<iconset resource="../rsrc/resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/icons/Folder Explorer-01.png</normaloff>:/icons/icons/Folder Explorer-01.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -944,8 +944,6 @@
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../rsrc/resources.qrc"/>
|
||||
</resources>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
Loading…
x
Reference in New Issue
Block a user