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:
parent
5d49c73919
commit
022db4d4e9
@ -19,12 +19,14 @@
|
||||
#define COUNTOF(array) (sizeof(array)/sizeof(array[0]))
|
||||
|
||||
#ifdef QT_WS_WIN
|
||||
QString EOL_MARK("\r\n");
|
||||
const QString EOL_MARK("\r\n");
|
||||
#else
|
||||
QString EOL_MARK("\n");
|
||||
const QString EOL_MARK("\n");
|
||||
#endif
|
||||
|
||||
#define PATH_SEP "/"
|
||||
#define PATH_SEP "/"
|
||||
#define FOSSIL_CHECKOUT1 "_FOSSIL_"
|
||||
#define FOSSIL_CHECKOUT2 ".fslckout"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
enum
|
||||
@ -237,11 +239,12 @@ bool MainWindow::openWorkspace(const QString &path)
|
||||
if(fi.isFile())
|
||||
{
|
||||
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;
|
||||
|
||||
// Ok open the fossil
|
||||
@ -292,11 +295,11 @@ bool MainWindow::openWorkspace(const QString &path)
|
||||
//------------------------------------------------------------------------------
|
||||
void MainWindow::on_actionOpenRepository_triggered()
|
||||
{
|
||||
QString filter(tr("Fossil Repositories (*.fossil)"));
|
||||
QString filter(tr("Fossil Files (*.fossil _FOSSIL_ .fslckout)"));
|
||||
|
||||
QString path = QFileDialog::getOpenFileName(
|
||||
this,
|
||||
tr("Fossil Repository"),
|
||||
tr("Open Fossil Repository"),
|
||||
QDir::currentPath(),
|
||||
filter,
|
||||
&filter);
|
||||
@ -309,7 +312,7 @@ void MainWindow::on_actionOpenRepository_triggered()
|
||||
//------------------------------------------------------------------------------
|
||||
void MainWindow::on_actionNewRepository_triggered()
|
||||
{
|
||||
QString filter(tr("Fossil Repositories (*.fossil)"));
|
||||
QString filter(tr("Repositories (*.fossil)"));
|
||||
|
||||
QString path = QFileDialog::getSaveFileName(
|
||||
this,
|
||||
@ -551,7 +554,7 @@ void MainWindow::scanWorkspace()
|
||||
QString filename = it->fileName();
|
||||
|
||||
// Skip fossil files
|
||||
if(filename == "_FOSSIL_" || (!repositoryFile.isEmpty() && it->absoluteFilePath()==repositoryFile))
|
||||
if(filename == FOSSIL_CHECKOUT1 || filename == FOSSIL_CHECKOUT2 || (!repositoryFile.isEmpty() && it->absoluteFilePath()==repositoryFile))
|
||||
continue;
|
||||
|
||||
RepoFile *rf = new RepoFile(*it, RepoFile::TYPE_UNKNOWN, wkdir);
|
||||
@ -677,15 +680,12 @@ static void addPathToTree(QStandardItem &root, const QString &path)
|
||||
//------------------------------------------------------------------------------
|
||||
void MainWindow::updateDirView()
|
||||
{
|
||||
if(viewMode != VIEWMODE_TREE)
|
||||
return;
|
||||
|
||||
// Directory View
|
||||
repoDirModel.clear();
|
||||
QStandardItem *root = new QStandardItem(QIcon(":icons/icons/My Documents-01.png"), projectName);
|
||||
root->setData(""); // Empty Path
|
||||
root->setEditable(false);
|
||||
QString aa = root->data().toString();
|
||||
|
||||
repoDirModel.appendRow(root);
|
||||
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
|
||||
D 2012-04-14T06:43:14.060
|
||||
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-14T09:16:30.450
|
||||
F CommitDialog.cpp bc05504be08d9ffe2b24d341a18e37035e1941b7
|
||||
F CommitDialog.h 65a7238dcdd41b578536a0b0ac2a65f2e7f23c9a
|
||||
F CommitDialog.ui 5067623f6af6f5a42c87df903278e383e945e154
|
||||
F FileActionDialog.cpp fcaebf9986f789b3440d5390b3458ad5f86fe0c8
|
||||
F FileActionDialog.h 15db1650b3a13d70bc338371e4c033c66e3b79ce
|
||||
F FileActionDialog.ui c63644428579741aeb5fa052e237ba799ced9ad7
|
||||
F MainWindow.cpp 73128657d821f9f0e574f6df56cad414829d8555
|
||||
F MainWindow.cpp f6ee64df8e4d275e3ed60462904566154758e9e1
|
||||
F MainWindow.h 643f13d4b5615c51c38b164768bf62258ccb94b1
|
||||
F MainWindow.ui 0afb7d2a8e9ce2cff2966295f9eefaed01f1ed51
|
||||
F SettingsDialog.cpp e1fad18cc020d08b82c6d35dc94f6624deec9a3b
|
||||
@ -174,7 +174,7 @@ F installer/fuel.iss 13b6a938bcdf273cbd3649d2549887baa1577214
|
||||
F installer/license.txt 4cc77b90af91e615a64ae04893fdffa7939db84c
|
||||
F main.cpp 46bf5ddc90fca01c9ef2e8e3d14b4d32217945dd
|
||||
F resources.qrc e98383ed205f4e37100c60057e0129c3b86dea53
|
||||
P 72c6ea7423b016df5150610f59fa8835b614701b
|
||||
R d9d54efe141f1b67bfc1bcf2605c87a6
|
||||
P b04aa4a2a385325b9b50e4ce700a364b05c7b70b
|
||||
R ba6b4795a2456f34d550ae60fa343370
|
||||
U kostas
|
||||
Z 5ff02e5fbeb527cf2633fffeb79226ba
|
||||
Z 6b958dff62628f63360ab69f37796e8d
|
||||
|
@ -1 +1 @@
|
||||
b04aa4a2a385325b9b50e4ce700a364b05c7b70b
|
||||
d0520ae5050524145697206927a579823b8920d0
|
Loading…
x
Reference in New Issue
Block a user