mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-18 18:38:51 +00:00
Improve project choose page (#1451)
This commit is contained in:
parent
2cc6479faa
commit
fd4b4b623a
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user