Allow for opening workspaces via the checkout file. [Thanks Chris]
Added support for the new ".fslckout" file Fixed an issue where the tree view was not being updated when hidden and a different workspace was opened Minor dialog text improvements FossilOrigin-Name: d0520ae5050524145697206927a579823b8920d0
This commit is contained in:
@ -19,12 +19,14 @@
|
|||||||
#define COUNTOF(array) (sizeof(array)/sizeof(array[0]))
|
#define COUNTOF(array) (sizeof(array)/sizeof(array[0]))
|
||||||
|
|
||||||
#ifdef QT_WS_WIN
|
#ifdef QT_WS_WIN
|
||||||
QString EOL_MARK("\r\n");
|
const QString EOL_MARK("\r\n");
|
||||||
#else
|
#else
|
||||||
QString EOL_MARK("\n");
|
const QString EOL_MARK("\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PATH_SEP "/"
|
#define PATH_SEP "/"
|
||||||
|
#define FOSSIL_CHECKOUT1 "_FOSSIL_"
|
||||||
|
#define FOSSIL_CHECKOUT2 ".fslckout"
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
enum
|
enum
|
||||||
@ -237,11 +239,12 @@ bool MainWindow::openWorkspace(const QString &path)
|
|||||||
if(fi.isFile())
|
if(fi.isFile())
|
||||||
{
|
{
|
||||||
wkspace = fi.absoluteDir().absolutePath();
|
wkspace = fi.absoluteDir().absolutePath();
|
||||||
QString metadata_file = wkspace + PATH_SEP + "_FOSSIL_";
|
QString checkout_file1 = wkspace + PATH_SEP + FOSSIL_CHECKOUT1;
|
||||||
|
QString checkout_file2 = wkspace + PATH_SEP + FOSSIL_CHECKOUT2;
|
||||||
|
|
||||||
if(!QFileInfo(metadata_file).exists())
|
if(!(QFileInfo(checkout_file1).exists() || QFileInfo(checkout_file2).exists()) )
|
||||||
{
|
{
|
||||||
if(QMessageBox::Yes !=DialogQuery(this, tr("Open Fossil"), "No workspace found.\nWould you like to make one here?"))
|
if(QMessageBox::Yes !=DialogQuery(this, tr("Open Fossil"), "A workspace does not exist in this folder.\nWould you like to create one here?"))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Ok open the fossil
|
// Ok open the fossil
|
||||||
@ -292,11 +295,11 @@ bool MainWindow::openWorkspace(const QString &path)
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
void MainWindow::on_actionOpenRepository_triggered()
|
void MainWindow::on_actionOpenRepository_triggered()
|
||||||
{
|
{
|
||||||
QString filter(tr("Fossil Repositories (*.fossil)"));
|
QString filter(tr("Fossil Files (*.fossil _FOSSIL_ .fslckout)"));
|
||||||
|
|
||||||
QString path = QFileDialog::getOpenFileName(
|
QString path = QFileDialog::getOpenFileName(
|
||||||
this,
|
this,
|
||||||
tr("Fossil Repository"),
|
tr("Open Fossil Repository"),
|
||||||
QDir::currentPath(),
|
QDir::currentPath(),
|
||||||
filter,
|
filter,
|
||||||
&filter);
|
&filter);
|
||||||
@ -309,7 +312,7 @@ void MainWindow::on_actionOpenRepository_triggered()
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
void MainWindow::on_actionNewRepository_triggered()
|
void MainWindow::on_actionNewRepository_triggered()
|
||||||
{
|
{
|
||||||
QString filter(tr("Fossil Repositories (*.fossil)"));
|
QString filter(tr("Repositories (*.fossil)"));
|
||||||
|
|
||||||
QString path = QFileDialog::getSaveFileName(
|
QString path = QFileDialog::getSaveFileName(
|
||||||
this,
|
this,
|
||||||
@ -551,7 +554,7 @@ void MainWindow::scanWorkspace()
|
|||||||
QString filename = it->fileName();
|
QString filename = it->fileName();
|
||||||
|
|
||||||
// Skip fossil files
|
// Skip fossil files
|
||||||
if(filename == "_FOSSIL_" || (!repositoryFile.isEmpty() && it->absoluteFilePath()==repositoryFile))
|
if(filename == FOSSIL_CHECKOUT1 || filename == FOSSIL_CHECKOUT2 || (!repositoryFile.isEmpty() && it->absoluteFilePath()==repositoryFile))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
RepoFile *rf = new RepoFile(*it, RepoFile::TYPE_UNKNOWN, wkdir);
|
RepoFile *rf = new RepoFile(*it, RepoFile::TYPE_UNKNOWN, wkdir);
|
||||||
@ -677,15 +680,12 @@ static void addPathToTree(QStandardItem &root, const QString &path)
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
void MainWindow::updateDirView()
|
void MainWindow::updateDirView()
|
||||||
{
|
{
|
||||||
if(viewMode != VIEWMODE_TREE)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Directory View
|
// Directory View
|
||||||
repoDirModel.clear();
|
repoDirModel.clear();
|
||||||
QStandardItem *root = new QStandardItem(QIcon(":icons/icons/My Documents-01.png"), projectName);
|
QStandardItem *root = new QStandardItem(QIcon(":icons/icons/My Documents-01.png"), projectName);
|
||||||
root->setData(""); // Empty Path
|
root->setData(""); // Empty Path
|
||||||
root->setEditable(false);
|
root->setEditable(false);
|
||||||
QString aa = root->data().toString();
|
|
||||||
repoDirModel.appendRow(root);
|
repoDirModel.appendRow(root);
|
||||||
for(stringset_t::iterator it = pathSet.begin(); it!=pathSet.end(); ++it)
|
for(stringset_t::iterator it = pathSet.begin(); it!=pathSet.end(); ++it)
|
||||||
{
|
{
|
||||||
|
12
manifest
12
manifest
@ -1,12 +1,12 @@
|
|||||||
C Fixed\sissue\swhere\sthe\sview\smode\sfrom\sthe\sstored\ssettings\swas\snot\sreflected\son\sstartup\n
|
C Allow\sfor\sopening\sworkspaces\svia\sthe\scheckout\sfile.\s[Thanks\sChris]\nAdded\ssupport\sfor\sthe\snew\s".fslckout"\sfile\nFixed\san\sissue\swhere\sthe\s\stree\sview\swas\snot\sbeing\supdated\swhen\shidden\sand\sa\sdifferent\sworkspace\swas\sopened\nMinor\sdialog\stext\simprovements\n
|
||||||
D 2012-04-14T06:43:14.060
|
D 2012-04-14T09:16:30.450
|
||||||
F CommitDialog.cpp bc05504be08d9ffe2b24d341a18e37035e1941b7
|
F CommitDialog.cpp bc05504be08d9ffe2b24d341a18e37035e1941b7
|
||||||
F CommitDialog.h 65a7238dcdd41b578536a0b0ac2a65f2e7f23c9a
|
F CommitDialog.h 65a7238dcdd41b578536a0b0ac2a65f2e7f23c9a
|
||||||
F CommitDialog.ui 5067623f6af6f5a42c87df903278e383e945e154
|
F CommitDialog.ui 5067623f6af6f5a42c87df903278e383e945e154
|
||||||
F FileActionDialog.cpp fcaebf9986f789b3440d5390b3458ad5f86fe0c8
|
F FileActionDialog.cpp fcaebf9986f789b3440d5390b3458ad5f86fe0c8
|
||||||
F FileActionDialog.h 15db1650b3a13d70bc338371e4c033c66e3b79ce
|
F FileActionDialog.h 15db1650b3a13d70bc338371e4c033c66e3b79ce
|
||||||
F FileActionDialog.ui c63644428579741aeb5fa052e237ba799ced9ad7
|
F FileActionDialog.ui c63644428579741aeb5fa052e237ba799ced9ad7
|
||||||
F MainWindow.cpp 73128657d821f9f0e574f6df56cad414829d8555
|
F MainWindow.cpp f6ee64df8e4d275e3ed60462904566154758e9e1
|
||||||
F MainWindow.h 643f13d4b5615c51c38b164768bf62258ccb94b1
|
F MainWindow.h 643f13d4b5615c51c38b164768bf62258ccb94b1
|
||||||
F MainWindow.ui 0afb7d2a8e9ce2cff2966295f9eefaed01f1ed51
|
F MainWindow.ui 0afb7d2a8e9ce2cff2966295f9eefaed01f1ed51
|
||||||
F SettingsDialog.cpp e1fad18cc020d08b82c6d35dc94f6624deec9a3b
|
F SettingsDialog.cpp e1fad18cc020d08b82c6d35dc94f6624deec9a3b
|
||||||
@ -174,7 +174,7 @@ F installer/fuel.iss 13b6a938bcdf273cbd3649d2549887baa1577214
|
|||||||
F installer/license.txt 4cc77b90af91e615a64ae04893fdffa7939db84c
|
F installer/license.txt 4cc77b90af91e615a64ae04893fdffa7939db84c
|
||||||
F main.cpp 46bf5ddc90fca01c9ef2e8e3d14b4d32217945dd
|
F main.cpp 46bf5ddc90fca01c9ef2e8e3d14b4d32217945dd
|
||||||
F resources.qrc e98383ed205f4e37100c60057e0129c3b86dea53
|
F resources.qrc e98383ed205f4e37100c60057e0129c3b86dea53
|
||||||
P 72c6ea7423b016df5150610f59fa8835b614701b
|
P b04aa4a2a385325b9b50e4ce700a364b05c7b70b
|
||||||
R d9d54efe141f1b67bfc1bcf2605c87a6
|
R ba6b4795a2456f34d550ae60fa343370
|
||||||
U kostas
|
U kostas
|
||||||
Z 5ff02e5fbeb527cf2633fffeb79226ba
|
Z 6b958dff62628f63360ab69f37796e8d
|
||||||
|
@ -1 +1 @@
|
|||||||
b04aa4a2a385325b9b50e4ce700a364b05c7b70b
|
d0520ae5050524145697206927a579823b8920d0
|
Reference in New Issue
Block a user