From ec631ba7f1cdeb8de4d247ac39cd4ccc4f24b078 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 3 Jan 2009 16:24:10 +0000 Subject: - Prevented full theme search when "builtin" theme was specified - Only do a recursive search for themes with depth 1 in '.' svn-id: r35706 --- gui/ThemeEngine.cpp | 14 +++++++++++--- gui/ThemeEngine.h | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'gui') diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 839137e1da..869294142f 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -1199,7 +1199,7 @@ void ThemeEngine::listUsableThemes(Common::List &list) { if (ConfMan.hasKey("extrapath")) listUsableThemes(Common::FSNode(ConfMan.get("extrapath")), list); - listUsableThemes(Common::FSNode("."), list); + listUsableThemes(Common::FSNode("."), list, 1); // Now we need to strip all duplicates // TODO: It might not be the best idea to strip duplicates. The user might @@ -1218,7 +1218,7 @@ void ThemeEngine::listUsableThemes(Common::List &list) { output.clear(); } -void ThemeEngine::listUsableThemes(Common::FSNode node, Common::List &list) { +void ThemeEngine::listUsableThemes(Common::FSNode node, Common::List &list, int depth) { if (!node.exists() || !node.isReadable() || !node.isDirectory()) return; @@ -1266,12 +1266,16 @@ void ThemeEngine::listUsableThemes(Common::FSNode node, Common::List &list); + static void listUsableThemes(Common::FSNode node, Common::List &list, int depth=-1); public: /** -- cgit v1.2.3