diff options
author | Vicent Marti | 2008-08-13 23:07:26 +0000 |
---|---|---|
committer | Vicent Marti | 2008-08-13 23:07:26 +0000 |
commit | c4f2a691ce3feed23b28ba8b657e94baa9d2301b (patch) | |
tree | 4a1212087e6bccc2bf02e5a34cd1cac2b5265eb8 /gui/themebrowser.cpp | |
parent | 80e059f2bb61f58e02d44d9dd125d23627d38b83 (diff) | |
download | scummvm-rg350-c4f2a691ce3feed23b28ba8b657e94baa9d2301b.tar.gz scummvm-rg350-c4f2a691ce3feed23b28ba8b657e94baa9d2301b.tar.bz2 scummvm-rg350-c4f2a691ce3feed23b28ba8b657e94baa9d2301b.zip |
Finished theme loading support.
Added "themerc" file to default theme.
svn-id: r33851
Diffstat (limited to 'gui/themebrowser.cpp')
-rw-r--r-- | gui/themebrowser.cpp | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/gui/themebrowser.cpp b/gui/themebrowser.cpp index f4039c6cff..2f1ab48f2d 100644 --- a/gui/themebrowser.cpp +++ b/gui/themebrowser.cpp @@ -91,7 +91,7 @@ void ThemeBrowser::updateListing() { // classic is always build in Entry th; - th.name = "Modern Development Theme (Builtin) - WIP"; + th.name = "ScummVM Modern Theme (Builtin Version)"; th.file = "builtin"; _themes.push_back(th); @@ -173,26 +173,12 @@ void ThemeBrowser::addDir(ThList &list, const Common::String &dir, int level) { bool ThemeBrowser::isTheme(const FilesystemNode &node, Entry &out) { out.file = node.getName(); - if (!out.file.hasSuffix(".zip") && !out.file.hasSuffix(".stx")) + if (!out.file.hasSuffix(".zip")) return false; - - for (int i = out.file.size()-1; out.file[i] != '.' && i > 0; --i) { - out.file.deleteLastChar(); - } - out.file.deleteLastChar(); - - if (out.file.empty()) + + if (!Theme::themeConfigUseable(out.file, out.name)) return false; -// TODO: Check if theme is usable. -// if (!Theme::themeConfigUseable(out.file, "", &type, &cfg)) -// return false; - -// if (cfg.hasKey("name", "theme")) -// cfg.getKey("name", "theme", out.name); -// else - out.name = out.file; - return true; } |