aboutsummaryrefslogtreecommitdiff
path: root/gui/options.cpp
diff options
context:
space:
mode:
authorMax Horn2007-09-18 20:02:04 +0000
committerMax Horn2007-09-18 20:02:04 +0000
commitc3d3aebe87d16d4fc3b7ac8581b99fb97241c9ac (patch)
tree17b2ba9f45743d2cf8f8e5faa6c9511e213f15f3 /gui/options.cpp
parent5c08cb1bcf84828cc93114fadbc89dd6f9909d06 (diff)
parent1dc13a641dd82825334e81bb3eb3b4ebd69d2552 (diff)
downloadscummvm-rg350-c3d3aebe87d16d4fc3b7ac8581b99fb97241c9ac.tar.gz
scummvm-rg350-c3d3aebe87d16d4fc3b7ac8581b99fb97241c9ac.tar.bz2
scummvm-rg350-c3d3aebe87d16d4fc3b7ac8581b99fb97241c9ac.zip
Patch #1768757: Merge fsnode-gsoc into trunk (MAJOR change, will break compilation on some ports)
svn-id: r28944
Diffstat (limited to 'gui/options.cpp')
-rw-r--r--gui/options.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index c14677f007..66786eff6c 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -27,6 +27,7 @@
#include "gui/themebrowser.h"
#include "gui/chooser.h"
#include "gui/eval.h"
+#include "gui/message.h"
#include "gui/newgui.h"
#include "gui/options.h"
#include "gui/PopUpWidget.h"
@@ -813,9 +814,14 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
if (browser.runModal() > 0) {
// User made his choice...
FilesystemNode dir(browser.getResult());
- _savePath->setLabel(dir.path());
+ if(dir.isWritable()) {
+ _savePath->setLabel(dir.getPath());
+ } else {
+ MessageDialog error("The chosen directory cannot be written to. Please select another one.");
+ error.runModal();
+ return;
+ }
draw();
- // TODO - we should check if the directory is writeable before accepting it
}
break;
}
@@ -824,7 +830,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
if (browser.runModal() > 0) {
// User made his choice...
FilesystemNode dir(browser.getResult());
- _themePath->setLabel(dir.path());
+ _themePath->setLabel(dir.getPath());
draw();
}
break;
@@ -834,7 +840,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
if (browser.runModal() > 0) {
// User made his choice...
FilesystemNode dir(browser.getResult());
- _extraPath->setLabel(dir.path());
+ _extraPath->setLabel(dir.getPath());
draw();
}
break;
@@ -844,9 +850,9 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
if (browser.runModal() > 0) {
// User made his choice...
FilesystemNode file(browser.getResult());
- _soundFont->setLabel(file.path());
+ _soundFont->setLabel(file.getPath());
- if (!file.path().empty() && (file.path() != "None"))
+ if (!file.getPath().empty() && (file.getPath() != "None"))
_soundFontClearButton->setEnabled(true);
else
_soundFontClearButton->setEnabled(false);