[Scummvm-cvs-logs] SF.net SVN: scummvm:[35574] scummvm/trunk/gui

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat Dec 27 17:09:08 CET 2008


Revision: 35574
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35574&view=rev
Author:   fingolfin
Date:     2008-12-27 16:09:08 +0000 (Sat, 27 Dec 2008)

Log Message:
-----------
Renamed some stuff

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

Modified: scummvm/trunk/gui/options.cpp
===================================================================
--- scummvm/trunk/gui/options.cpp	2008-12-27 16:07:10 UTC (rev 35573)
+++ scummvm/trunk/gui/options.cpp	2008-12-27 16:09:08 UTC (rev 35574)
@@ -930,8 +930,8 @@
 		ThemeBrowser browser;
 		if (browser.runModal() > 0) {
 			// User made his choice...
-			const Common::String &theme = browser.selected();
-			if (0 != theme.compareToIgnoreCase(g_gui.theme()->getThemeFileName()))
+			const Common::String &theme = browser.getSelected();
+			if (!theme.equalsIgnoreCase(g_gui.theme()->getThemeFileName()))
 				if (g_gui.loadNewTheme(theme)) {
 					_curTheme->setLabel(g_gui.theme()->getThemeName());
 					ConfMan.set("gui_theme", theme);

Modified: scummvm/trunk/gui/themebrowser.cpp
===================================================================
--- scummvm/trunk/gui/themebrowser.cpp	2008-12-27 16:07:10 UTC (rev 35573)
+++ scummvm/trunk/gui/themebrowser.cpp	2008-12-27 16:09:08 UTC (rev 35574)
@@ -92,7 +92,7 @@
 	_themes.clear();
 
 	// classic is always built-in
-	Entry th;
+	ThemeDescriptor th;
 	th.name = "ScummVM Classic Theme (Builtin Version)";
 	th.file = "builtin";
 	_themes.push_back(th);
@@ -128,7 +128,7 @@
 	// Populate the ListWidget
 	Common::StringList list;
 
-	for (ThList::const_iterator i = _themes.begin(); i != _themes.end(); ++i)
+	for (ThemeDescList::const_iterator i = _themes.begin(); i != _themes.end(); ++i)
 		list.push_back(i->name);
 
 	_fileList->setList(list);
@@ -139,7 +139,7 @@
 }
 
 
-void ThemeBrowser::addDir(ThList &list, const Common::FSNode &node) {
+void ThemeBrowser::addDir(ThemeDescList &list, const Common::FSNode &node) {
 	if (!node.exists() || !node.isReadable())
 		return;
 
@@ -151,11 +151,11 @@
 
 	for (Common::FSList::const_iterator i = fslist.begin(); i != fslist.end(); ++i) {
 
-		Entry th;
+		ThemeDescriptor th;
 		if (isTheme(*i, th)) {
 			bool add = true;
 
-			for (ThList::const_iterator p = list.begin(); p != list.end(); ++p) {
+			for (ThemeDescList::const_iterator p = list.begin(); p != list.end(); ++p) {
 				if (p->name == th.name || p->file == th.file) {
 					add = false;
 					break;
@@ -168,7 +168,7 @@
 	}
 }
 
-bool ThemeBrowser::isTheme(const Common::FSNode &node, Entry &out) {
+bool ThemeBrowser::isTheme(const Common::FSNode &node, ThemeDescriptor &out) {
 	out.file = node.getPath();
 
 #ifdef USE_ZLIB

Modified: scummvm/trunk/gui/themebrowser.h
===================================================================
--- scummvm/trunk/gui/themebrowser.h	2008-12-27 16:07:10 UTC (rev 35573)
+++ scummvm/trunk/gui/themebrowser.h	2008-12-27 16:09:08 UTC (rev 35574)
@@ -42,22 +42,22 @@
 	void open();
 	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
 
-	const Common::String &selected() const { return _select; }
+	const Common::String &getSelected() const { return _select; }
 private:
-	struct Entry {
+	struct ThemeDescriptor {
 		Common::String name;
 		Common::String file;
 	};
 
 	ListWidget *_fileList;
 	Common::String _select;
-	typedef Common::Array<Entry> ThList;
-	ThList _themes;
+	typedef Common::Array<ThemeDescriptor> ThemeDescList;
+	ThemeDescList _themes;
 
 	void updateListing();
 
-	void addDir(ThList &list, const Common::FSNode &node);
-	bool isTheme(const Common::FSNode &node, Entry &out);
+	void addDir(ThemeDescList &list, const Common::FSNode &node);
+	bool isTheme(const Common::FSNode &node, ThemeDescriptor &out);
 };
 
 } // end of namespace GUI


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