[Scummvm-cvs-logs] SF.net SVN: scummvm:[39703] scummvm/trunk/gui/themebrowser.cpp
tanoku at users.sourceforge.net
tanoku at users.sourceforge.net
Thu Mar 26 21:24:16 CET 2009
Revision: 39703
http://scummvm.svn.sourceforge.net/scummvm/?rev=39703&view=rev
Author: tanoku
Date: 2009-03-26 20:24:16 +0000 (Thu, 26 Mar 2009)
Log Message:
-----------
Theme selection dialog now automatically selects the currently active theme. Fixes bug #2706967.
Modified Paths:
--------------
scummvm/trunk/gui/themebrowser.cpp
Modified: scummvm/trunk/gui/themebrowser.cpp
===================================================================
--- scummvm/trunk/gui/themebrowser.cpp 2009-03-26 13:52:43 UTC (rev 39702)
+++ scummvm/trunk/gui/themebrowser.cpp 2009-03-26 20:24:16 UTC (rev 39703)
@@ -97,12 +97,20 @@
ThemeEngine::listUsableThemes(_themes);
+ const Common::String currentThemeId = g_gui.theme()->getThemeId();
+ int currentThemeIndex = 0, index = 0;
+
Common::StringList list;
- for (ThemeDescList::const_iterator i = _themes.begin(); i != _themes.end(); ++i)
+ for (ThemeDescList::const_iterator i = _themes.begin(); i != _themes.end(); ++i, ++index) {
list.push_back(i->name);
+ if (i->id == currentThemeId)
+ currentThemeIndex = index;
+ }
+
_fileList->setList(list);
_fileList->scrollTo(0);
+ _fileList->setSelected(currentThemeIndex);
// Finally, redraw
draw();
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