[Scummvm-cvs-logs] SF.net SVN: scummvm:[35138] scummvm/trunk/gui/themebrowser.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Nov 21 09:22:33 CET 2008


Revision: 35138
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35138&view=rev
Author:   fingolfin
Date:     2008-11-21 08:22:33 +0000 (Fri, 21 Nov 2008)

Log Message:
-----------
GUI: Simplify ThemeBrowser code

Modified Paths:
--------------
    scummvm/trunk/gui/themebrowser.cpp

Modified: scummvm/trunk/gui/themebrowser.cpp
===================================================================
--- scummvm/trunk/gui/themebrowser.cpp	2008-11-20 22:58:22 UTC (rev 35137)
+++ scummvm/trunk/gui/themebrowser.cpp	2008-11-21 08:22:33 UTC (rev 35138)
@@ -143,9 +143,11 @@
 	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 @@
 				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) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list