From: Mikko Keinänen Date: Sat, 18 Dec 2010 21:10:39 +0000 (+0200) Subject: Added message telling that the temporary directory has been X-Git-Url: http://vcs.maemo.org/git/?p=emufront;a=commitdiff_plain;h=cda773605f679deaff13c1a833f872bfbfe43974 Added message telling that the temporary directory has been updated. --- diff --git a/doc/tests.txt b/doc/tests.txt index 8eac9fd..91d5866 100644 --- a/doc/tests.txt +++ b/doc/tests.txt @@ -1,19 +1,41 @@ -Setupview ---------- +1. Start EmuFront +----------------- +- if database already exists move/remove it: -Test 1: + $ mv ~/emufront.db.sqlite ~/emufront.db.sqlite.bak + +- start EmuFront from command line + + $ emufront + +> EmuFront main window opens + > File, Config & Help menu is shown + > empty combo box for selecting setups and emulators is shown + > empty area for filtered media image containers is shown + +2. Set temporary directory +-------------------------- +- Select 'Config->Temp dir' +> A file selector is opened, only folders can be selected +- Select a folder +> A messagebox is shown telling that the Temporary directory has been updated to selected folder. + +X. Setupview +------------ + +1: - Add new setup when no platform or media types are yet added Result: - Shows error that no platform or media types are not added - New row is not created -Test 2: +2: - Add new setup when any platforms are not yet added Result: - Shows error that any platform is not available - New row is not created -Test 3: +3: - Add new setup when any media types are not yet added Result: - Shows error that any media type is not available diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2259cf2..7f530ac 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -270,19 +270,22 @@ void MainWindow::configureEmulatorss() void MainWindow::configureTmpDir() { - /*if (!tmpFolderDialog) { - tmpFolderDialog = new TmpFolderEditDialog(this, tmpDirFilePath); - } - activateDialog(tmpFolderDialog);*/ - QString fpath = QFileDialog::getExistingDirectory(this, tr("Select a directory"), tmpDirFilePath, QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); QDir d(fpath); if (d.exists() && d.isReadable()) { tmpDirFilePath = fpath; - DbConfig::setTmpDir(tmpDirFilePath); - launcher->setTmpDirPath(tmpDirFilePath); + if (DbConfig::setTmpDir(tmpDirFilePath)) { + QMessageBox::information( + this, + tr("Temp dir updated"), + tr("The directory for temporary files " + "has been updated to '%1'.") + .arg(tmpDirFilePath) + ); + launcher->setTmpDirPath(tmpDirFilePath); + } } }