Permalink
Browse files

BUG-43: Deleting prefix does not remove prefix folder in ~/.local/sha…

…re/wineprefixes
  • Loading branch information...
brezerk committed Jan 9, 2014
1 parent 19ec0f4 commit 5dd5ec475783dbae38e2a333dca43b07759286c6
View
@@ -1,3 +1,9 @@
Version 1.2
Added:
- Deleting prefix does not remove prefix folder in ~/.local/share/wineprefixes [BUG-43];
Fixed:
- Backup/Restore prefix path handler;
Version 1.1-r2
Fixed:
- Error while loading application settings by key: 'WineLibs' [BUG-42];
View
@@ -346,7 +346,6 @@ bool system_menu::wipeSystemMenu(){
dir.setPath(dir_path);
if (dir.exists()){
CoreLib->removeDirectory(dir_path);
dir.rmdir(dir_path);
}
return true;
@@ -215,6 +215,7 @@ void PrefixControlWidget::prefixDelete_Click(){
return;
QString prefixName = model->index(prefixTable->currentIndex().row(), 0, QModelIndex()).data().toString();
QString prefixPath = model->index(prefixTable->currentIndex().row(), 3, QModelIndex()).data().toString();
if (prefixName.isEmpty())
return;
@@ -224,7 +225,22 @@ void PrefixControlWidget::prefixDelete_Click(){
return;
}
if(QMessageBox::warning(this, tr("Warning"), tr("Do you really wish to delete the prefix named \"%1\" and all associated icons?").arg(prefixName), QMessageBox::Ok, QMessageBox::Cancel)==QMessageBox::Ok){
QMessageBox msgBox(this);
QCheckBox dontPrompt(QObject::tr("Remove prefix directory"), &msgBox);
dontPrompt.blockSignals(true);
msgBox.setIcon(QMessageBox::Warning);
msgBox.setWindowTitle(tr("Warning"));
msgBox.setText(tr("Do you really wish to delete the prefix named \"%1\" and all associated icons?").arg(prefixName));
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
msgBox.setDefaultButton(QMessageBox::Cancel);
msgBox.addButton(&dontPrompt, QMessageBox::ActionRole);
if(msgBox.exec()==QMessageBox::Ok){
if (dontPrompt.checkState() == Qt::Checked){
CoreLib->removeDirectory(prefixPath);
}
if (db_icon.delIconsByPrefixName(prefixName))
if(db_dir.delDir(prefixName)){
db_prefix.delByName(prefixName);
@@ -356,7 +372,7 @@ void PrefixControlWidget::prefixExport_Click(){
qDebug()<<"[ii] row is valid";
#endif
QString prefixName = model->index(prefixTable->currentIndex().row(), 0, QModelIndex()).data().toString();
QString prefixPath = model->index(prefixTable->currentIndex().row(), 2, QModelIndex()).data().toString();
QString prefixPath = model->index(prefixTable->currentIndex().row(), 3, QModelIndex()).data().toString();
#ifdef DEBUG
qDebug()<<"[ii] name: " << prefixName << " Path: " << prefixPath;
@@ -36,6 +36,7 @@
//Qt includes
#include <QSqlQueryModel>
#include <QTableView>
#include <QCheckBox>
#include <QToolBar>
#include <QMenu>
#include <QHeaderView>
@@ -2033,8 +2033,6 @@ QStringList corelib::getCdromDevices(void) const{
#ifdef DEBUG
qDebug()<<"[DD] Remove dir "<<list.at(i).absoluteFilePath();
#endif
if (not dir.rmdir(list.at(i).absoluteFilePath()))
return false;
} else {
#ifdef DEBUG
qDebug()<<"[DD] Remove file "<< list.at(i).absoluteFilePath();
@@ -2043,5 +2041,7 @@ QStringList corelib::getCdromDevices(void) const{
return false;
}
}
if (not dir.rmdir(dirPath))
return false;
return true;
}

0 comments on commit 5dd5ec4

Please sign in to comment.