Improve project choose page (#1451)

This commit is contained in:
optizone 2019-04-16 12:31:02 +03:00 committed by xarkes
parent 2cc6479faa
commit fd4b4b623a

View File

@ -61,6 +61,9 @@ NewFileDialog::NewFileDialog(MainWindow *main) :
ui->projectsListWidget->addAction(ui->actionRemove_project);
ui->logoSvgWidget->load(Config()->getLogoFile());
// radare2 does not seem to save this config so here we load this manually
Core()->setConfig("dir.projects", Config()->getDirProjects());
fillRecentFilesList();
fillIOPluginsList();
fillProjectsList();
@ -104,11 +107,18 @@ void NewFileDialog::on_selectProjectsDirButton_clicked()
tr("Select project path (dir.projects)"),
currentDir));
if (!dir.isEmpty()) {
if (dir.isEmpty()) {
return;
}
if (!QFileInfo(dir).isWritable()) {
QMessageBox::critical(this, tr("Permission denied"),
tr("You do not have write access to <b>%1</b>")
.arg(dir));
return;
}
Config()->setDirProjects(dir);
Core()->setConfig("dir.projects", dir);
fillProjectsList();
}