diff options
author | Max Horn | 2008-11-21 08:22:33 +0000 |
---|---|---|
committer | Max Horn | 2008-11-21 08:22:33 +0000 |
commit | 33dd58ca9894676c52498498eb5d19e48e3cc998 (patch) | |
tree | 77d401e3cacafcd915c5acbf38969054b5beca30 /gui/themebrowser.cpp | |
parent | f4d8ecaf6a697fd90d068f363e74d1bab3da7f80 (diff) | |
download | scummvm-rg350-33dd58ca9894676c52498498eb5d19e48e3cc998.tar.gz scummvm-rg350-33dd58ca9894676c52498498eb5d19e48e3cc998.tar.bz2 scummvm-rg350-33dd58ca9894676c52498498eb5d19e48e3cc998.zip |
GUI: Simplify ThemeBrowser code
svn-id: r35138
Diffstat (limited to 'gui/themebrowser.cpp')
-rw-r--r-- | gui/themebrowser.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/gui/themebrowser.cpp b/gui/themebrowser.cpp index d19aa09142..c7b255cc1e 100644 --- a/gui/themebrowser.cpp +++ b/gui/themebrowser.cpp @@ -143,9 +143,11 @@ void ThemeBrowser::addDir(ThList &list, const Common::FSNode &node) { if (!node.exists() || !node.isReadable()) return; + // Scan this dir, all files and all subdirs in it for themes Common::FSList fslist; if (!node.getChildren(fslist, Common::FSNode::kListAll)) return; + fslist.push_back(node); // Yup, also scan the dir itself for (Common::FSList::const_iterator i = fslist.begin(); i != fslist.end(); ++i) { @@ -164,26 +166,6 @@ void ThemeBrowser::addDir(ThList &list, const Common::FSNode &node) { list.push_back(th); } } - - if (node.lookupFile(fslist, "THEMERC", false, true, 1)) { - for (Common::FSList::const_iterator i = fslist.begin(); i != fslist.end(); ++i) { - - Entry th; - if (isTheme(i->getParent(), th)) { - bool add = true; - - for (ThList::const_iterator p = list.begin(); p != list.end(); ++p) { - if (p->name == th.name || p->file == th.file) { - add = false; - break; - } - } - - if (add) - list.push_back(th); - } - } - } } bool ThemeBrowser::isTheme(const Common::FSNode &node, Entry &out) { |