aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorDavid Corrales2007-06-05 21:02:35 +0000
committerDavid Corrales2007-06-05 21:02:35 +0000
commit3b96c7fad54ff7f5000667be494e50e7ca11e69a (patch)
tree265263a7fc44ca51c2391e929e7c4fd0da676315 /gui
parent716bcd0b2bcd4d04489bc2fc23a948fad3e2c02a (diff)
downloadscummvm-rg350-3b96c7fad54ff7f5000667be494e50e7ca11e69a.tar.gz
scummvm-rg350-3b96c7fad54ff7f5000667be494e50e7ca11e69a.tar.bz2
scummvm-rg350-3b96c7fad54ff7f5000667be494e50e7ca11e69a.zip
Renamed methods in the FilesystemNode class to match the AbstractFSNode implementations.
Also exposed the new methods (exists, isReadable and isWritable) in FilesystemNode. svn-id: r27113
Diffstat (limited to 'gui')
-rw-r--r--gui/browser.cpp10
-rw-r--r--gui/launcher.cpp16
-rw-r--r--gui/massadd.cpp6
-rw-r--r--gui/options.cpp10
-rw-r--r--gui/themebrowser.cpp6
5 files changed, 24 insertions, 24 deletions
diff --git a/gui/browser.cpp b/gui/browser.cpp
index b9cae7d923..ebe4aef0c4 100644
--- a/gui/browser.cpp
+++ b/gui/browser.cpp
@@ -222,15 +222,15 @@ void BrowserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
void BrowserDialog::updateListing() {
// Update the path display
- _currentPath->setLabel(_node.path());
+ _currentPath->setLabel(_node.getPath());
// We memorize the last visited path.
- ConfMan.set("browser_lastpath", _node.path());
+ ConfMan.set("browser_lastpath", _node.getPath());
// Read in the data from the file system
FilesystemNode::ListMode listMode = _isDirBrowser ? FilesystemNode::kListDirectoriesOnly
: FilesystemNode::kListAll;
- if (!_node.listDir(_nodeContent, listMode)) {
+ if (!_node.getChildren(_nodeContent, listMode)) {
_nodeContent.clear();
} else {
Common::sort(_nodeContent.begin(), _nodeContent.end());
@@ -240,9 +240,9 @@ void BrowserDialog::updateListing() {
Common::StringList list;
for (FSList::iterator i = _nodeContent.begin(); i != _nodeContent.end(); ++i) {
if (!_isDirBrowser && i->isDirectory())
- list.push_back(i->displayName() + "/");
+ list.push_back(i->getDisplayName() + "/");
else
- list.push_back(i->displayName());
+ list.push_back(i->getDisplayName());
}
_fileList->setList(list);
_fileList->scrollTo(0);
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index eba5498318..4a92de1101 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -405,9 +405,9 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
if (browser.runModal() > 0) {
// User made this 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);
@@ -428,7 +428,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
// done with optional specific gameid to pluginmgr detectgames?
// FSList files = dir.listDir(FilesystemNode::kListFilesOnly);
- _gamePathWidget->setLabel(dir.path());
+ _gamePathWidget->setLabel(dir.getPath());
draw();
}
draw();
@@ -441,7 +441,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
if (browser.runModal() > 0) {
// User made his choice...
FilesystemNode dir(browser.getResult());
- _extraPathWidget->setLabel(dir.path());
+ _extraPathWidget->setLabel(dir.getPath());
draw();
}
draw();
@@ -453,7 +453,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
if (browser.runModal() > 0) {
// User made his choice...
FilesystemNode dir(browser.getResult());
- _savePathWidget->setLabel(dir.path());
+ _savePathWidget->setLabel(dir.getPath());
draw();
}
draw();
@@ -654,9 +654,9 @@ void LauncherDialog::addGame() {
// User made his choice...
FilesystemNode dir(_browser->getResult());
FSList files;
- if (!dir.listDir(files, FilesystemNode::kListAll)) {
+ if (!dir.getChildren(files, FilesystemNode::kListAll)) {
error("browser returned a node that is not a directory: '%s'",
- dir.path().c_str());
+ dir.getPath().c_str());
}
// ...so let's determine a list of candidates, games that
@@ -686,7 +686,7 @@ void LauncherDialog::addGame() {
GameDescriptor result = candidates[idx];
// TODO: Change the detectors to set "path" !
- result["path"] = dir.path();
+ result["path"] = dir.getPath();
Common::String domain = addGameToConf(result);
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index de54cada26..c12e60ea8b 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -127,9 +127,9 @@ void MassAddDialog::handleTickle() {
FilesystemNode dir = _scanStack.pop();
FSList files;
- if (!dir.listDir(files, FilesystemNode::kListAll)) {
+ if (!dir.getChildren(files, FilesystemNode::kListAll)) {
error("browser returned a node that is not a directory: '%s'",
- dir.path().c_str());
+ dir.getPath().c_str());
}
// Run the detector on the dir
@@ -141,7 +141,7 @@ void MassAddDialog::handleTickle() {
// e.g. ask the user which one to pick (make sure to display the
// path, too).
GameDescriptor result = candidates[0];
- result["path"] = dir.path();
+ result["path"] = dir.getPath();
_games.push_back(result);
}
diff --git a/gui/options.cpp b/gui/options.cpp
index 76a40f5f50..4d6cadfdef 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -821,7 +821,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
if (browser.runModal() > 0) {
// User made his choice...
FilesystemNode dir(browser.getResult());
- _savePath->setLabel(dir.path());
+ _savePath->setLabel(dir.getPath());
draw();
// TODO - we should check if the directory is writeable before accepting it
}
@@ -832,7 +832,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;
@@ -842,7 +842,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;
@@ -852,9 +852,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);
diff --git a/gui/themebrowser.cpp b/gui/themebrowser.cpp
index 8f72127a75..4d8c439872 100644
--- a/gui/themebrowser.cpp
+++ b/gui/themebrowser.cpp
@@ -148,12 +148,12 @@ void ThemeBrowser::addDir(ThList &list, const Common::String &dir, int level) {
return;
FSList fslist;
- if (!node.listDir(fslist, FilesystemNode::kListAll))
+ if (!node.getChildren(fslist, FilesystemNode::kListAll))
return;
for (FSList::const_iterator i = fslist.begin(); i != fslist.end(); ++i) {
if (i->isDirectory()) {
- addDir(list, i->path(), level-1);
+ addDir(list, i->getPath(), level-1);
} else {
Entry th;
if (isTheme(*i, th)) {
@@ -176,7 +176,7 @@ bool ThemeBrowser::isTheme(const FilesystemNode &node, Entry &out) {
Common::ConfigFile cfg;
Common::String type;
- out.file = node.name();
+ out.file = node.getName();
for (int i = out.file.size()-1; out.file[i] != '.' && i > 0; --i) {
out.file.deleteLastChar();
}