130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
-
+
|
return ok;
}
//------------------------------------------------------------------------------
void MainWindow::on_actionOpen_triggered()
{
QString path = QFileDialog::getExistingDirectory(this, tr("Fossil Checkout"));
QString path = QFileDialog::getExistingDirectory(this, tr("Fossil Checkout"), QDir::currentPath());
if(!path.isNull())
openWorkspace(path);
}
//------------------------------------------------------------------------------
void MainWindow::rebuildRecent()
{
|
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
|
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
|
-
+
|
void MainWindow::on_actionNew_triggered()
{
QString filter(tr("Fossil Repositories (*.fossil)"));
QString path = QFileDialog::getSaveFileName(
this,
tr("New Fossil Repository"),
QString(),
QDir::currentPath(),
filter,
&filter);
if(path.isEmpty())
return;
if(QFile::exists(path))
|
1115
1116
1117
1118
1119
1120
1121
|
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
//------------------------------------------------------------------------------
void MainWindow::on_actionSettings_triggered()
{
SettingsDialog::run(this, settings);
}
//------------------------------------------------------------------------------
void MainWindow::on_actionSyncSettings_triggered()
{
QString current;
// Retrieve existing url
QStringList out;
if(runFossil(QStringList() << "remote-url", &out, true) && out.length()==1)
current = out[0].trimmed();
bool ok = false;
current = QInputDialog::getText(this, tr("Remote URL"), tr("Enter new remote url"), QLineEdit::Normal, current, &ok );
if(!ok)
return;
QUrl url(current);
if(!url.isValid())
{
QMessageBox::critical(this, tr("Remote URL"), tr("This URL is not valid"), QMessageBox::Ok );
return;
}
runFossil(QStringList() << "remote-url" << QuotePath(url.toString()));
}
|