mirror of
https://github.com/rizinorg/cutter.git
synced 2025-02-07 15:32:13 +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->projectsListWidget->addAction(ui->actionRemove_project);
|
||||||
ui->logoSvgWidget->load(Config()->getLogoFile());
|
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();
|
fillRecentFilesList();
|
||||||
fillIOPluginsList();
|
fillIOPluginsList();
|
||||||
fillProjectsList();
|
fillProjectsList();
|
||||||
@ -104,11 +107,18 @@ void NewFileDialog::on_selectProjectsDirButton_clicked()
|
|||||||
tr("Select project path (dir.projects)"),
|
tr("Select project path (dir.projects)"),
|
||||||
currentDir));
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Config()->setDirProjects(dir);
|
Config()->setDirProjects(dir);
|
||||||
|
Core()->setConfig("dir.projects", dir);
|
||||||
fillProjectsList();
|
fillProjectsList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user