[Scummvm-cvs-logs] SF.net SVN: scummvm: [27899] scummex/branches/gsoc2007-gameresbrowser

zbychs at users.sourceforge.net zbychs at users.sourceforge.net
Wed Jul 4 18:41:41 CEST 2007


Revision: 27899
          http://scummvm.svn.sourceforge.net/scummvm/?rev=27899&view=rev
Author:   zbychs
Date:     2007-07-04 09:41:41 -0700 (Wed, 04 Jul 2007)

Log Message:
-----------
Still segfaults under Linux... Working on it.

Modified Paths:
--------------
    scummex/branches/gsoc2007-gameresbrowser/gcc/Makefile
    scummex/branches/gsoc2007-gameresbrowser/src/core/tostring.h
    scummex/branches/gsoc2007-gameresbrowser/src/gui/DirectoryPresenter.cpp
    scummex/branches/gsoc2007-gameresbrowser/src/gui/FilePresenter.cpp
    scummex/branches/gsoc2007-gameresbrowser/src/gui/ImagePresenter.cpp
    scummex/branches/gsoc2007-gameresbrowser/src/gui/Test1.cpp
    scummex/branches/gsoc2007-gameresbrowser/src/plugins/BMPParser.cpp
    scummex/branches/gsoc2007-gameresbrowser/src/plugins/Directories.cpp

Modified: scummex/branches/gsoc2007-gameresbrowser/gcc/Makefile
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/gcc/Makefile	2007-07-04 13:15:03 UTC (rev 27898)
+++ scummex/branches/gsoc2007-gameresbrowser/gcc/Makefile	2007-07-04 16:41:41 UTC (rev 27899)
@@ -54,14 +54,16 @@
 ###########################################################################################
 
 WX_VERSION = 2.8
-WX_FLAGS = `wx-config --version=$(WX_VERSION) --debug=no --cxxflags`
-WX_LIBS = `wx-config --version=$(WX_VERSION) --debug=no --libs`
+WX_FLAGS = $(shell wx-config --version=$(WX_VERSION) --debug=no --cxxflags)
+WX_LIBS = $(shell wx-config --version=$(WX_VERSION) --debug=no --libs)
 
 ###########################################################################################
 
 GLOBAL_DEFINES = NDEBUG UNIX
 
-CFLAGS = -g $(patsubst %, -I%, $(HEADERS_DIRS) ) $(patsubst %, -D%, $(GLOBAL_DEFINES) ) $(WX_FLAGS)
+BASE_FLAGS = -g $(patsubst %, -I%, $(HEADERS_DIRS) ) $(patsubst %, -D%, $(GLOBAL_DEFINES) )
+CFLAGS = $(BASE_FLAGS) $(WX_FLAGS)
+DEPFLAGS = $(BASE_FLAGS) $(filter-out -I%, $(WX_FLAGS) )
 
 MKDIR = mkdir -p
 
@@ -72,7 +74,7 @@
 ###########################################################################################
 
 dep:
-	makedepend -Y -- $(CFLAGS) -- $(ALL_SOURCES)
+	makedepend -Y -- $(DEPFLAGS) -- $(ALL_SOURCES)
 
 ###########################################################################################
 
@@ -152,3 +154,242 @@
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.
 
+../src/core/common/simplefile.o: ../src/core/common/stdafx.h
+../src/core/common/simplefile.o: ../src/core/common/simplefile.h
+../src/core/common/simplefile.o: ../src/core/common/stream.h
+../src/core/common/simplefile.o: ../src/core/common/stdafx.h
+../src/core/common/simplefile.o: ../src/core/common/scummsys.h
+../src/core/common/stream.o: ../src/core/common/stdafx.h
+../src/core/common/stream.o: ../src/core/common/stream.h
+../src/core/common/stream.o: ../src/core/common/stdafx.h
+../src/core/common/stream.o: ../src/core/common/scummsys.h
+../src/core/CoreFileTypes.o: ../src/core/common/stdafx.h
+../src/core/CoreFileTypes.o: ../src/core/CoreFileTypes.h ../src/core/guid.h
+../src/core/CoreFileTypes.o: ../src/core/safe_static.h ../src/core/debugmem.h
+../src/core/CoreIntf.o: ../src/core/common/stdafx.h ../src/core/CoreIntf.h
+../src/core/CoreIntf.o: ../src/core/pinslot.h ../src/core/guid.h
+../src/core/CoreIntf.o: ../src/core/tostring.h ../src/core/debugmem.h
+../src/core/CoreIntf.o: ../src/core/rcobject.h ../src/core/pinslot_detail.h
+../src/core/CoreIntf.o: ../src/core/functionalex.h
+../src/core/CoreIntf.o: ../src/core/common/stream.h
+../src/core/CoreIntf.o: ../src/core/common/stdafx.h
+../src/core/CoreIntf.o: ../src/core/common/scummsys.h
+../src/core/CoreIntf.o: ../src/core/common/simplefile.h
+../src/core/guid.o: ../src/core/common/stdafx.h ../src/core/guid.h
+../src/core/ochain.o: ../src/core/common/stdafx.h ../src/core/ochain.h
+../src/core/ochain.o: ../src/core/pinslot.h ../src/core/guid.h
+../src/core/ochain.o: ../src/core/tostring.h ../src/core/debugmem.h
+../src/core/ochain.o: ../src/core/rcobject.h ../src/core/pinslot_detail.h
+../src/core/ochain.o: ../src/core/functionalex.h ../src/core/oregistry.h
+../src/core/ochain.o: ../src/core/plugin.h ../src/core/plugin_detail.h
+../src/core/ochain.o: ../src/core/treealgos.h
+../src/core/oregistry.o: ../src/core/common/stdafx.h ../src/core/oregistry.h
+../src/core/oregistry.o: ../src/core/plugin.h ../src/core/guid.h
+../src/core/oregistry.o: ../src/core/pinslot.h ../src/core/tostring.h
+../src/core/oregistry.o: ../src/core/debugmem.h ../src/core/rcobject.h
+../src/core/oregistry.o: ../src/core/pinslot_detail.h
+../src/core/oregistry.o: ../src/core/functionalex.h
+../src/core/oregistry.o: ../src/core/plugin_detail.h ../src/core/ftregistry.h
+../src/core/oregistry.o: ../src/core/FileTypeRecognizer.h
+../src/core/oregistry.o: ../src/core/CoreIntf.h ../src/core/common/stream.h
+../src/core/oregistry.o: ../src/core/common/stdafx.h
+../src/core/oregistry.o: ../src/core/common/scummsys.h
+../src/core/oregistry.o: ../src/core/CoreFileTypes.h
+../src/core/oregistry.o: ../src/core/safe_static.h
+../src/core/pinslot.o: ../src/core/common/stdafx.h ../src/core/pinslot.h
+../src/core/pinslot.o: ../src/core/guid.h ../src/core/tostring.h
+../src/core/pinslot.o: ../src/core/debugmem.h ../src/core/rcobject.h
+../src/core/pinslot.o: ../src/core/pinslot_detail.h
+../src/core/pinslot.o: ../src/core/functionalex.h
+../src/core/rcobject.o: ../src/core/common/stdafx.h ../src/core/rcobject.h
+../src/core/stdafx.o: ../src/core/common/stdafx.h
+../src/plugins/BMPParser.o: ../src/core/common/stdafx.h
+../src/plugins/BMPParser.o: ../src/plugins/BMPParser.h ../src/core/pinslot.h
+../src/plugins/BMPParser.o: ../src/core/guid.h ../src/core/tostring.h
+../src/plugins/BMPParser.o: ../src/core/debugmem.h ../src/core/rcobject.h
+../src/plugins/BMPParser.o: ../src/core/pinslot_detail.h
+../src/plugins/BMPParser.o: ../src/core/functionalex.h
+../src/plugins/BMPParser.o: ../src/plugins/GUIIntf.h ../src/core/CoreIntf.h
+../src/plugins/BMPParser.o: ../src/core/common/stream.h
+../src/plugins/BMPParser.o: ../src/core/common/stdafx.h
+../src/plugins/BMPParser.o: ../src/core/common/scummsys.h
+../src/plugins/BMPParser.o: ../src/plugins/wx2scstream.h
+../src/plugins/BitmapPanel.o: ../src/plugins/BitmapPanel.h
+../src/plugins/Directories.o: ../src/core/common/stdafx.h
+../src/plugins/Directories.o: ../src/plugins/Directories.h
+../src/plugins/Directories.o: ../src/plugins/VirtualNode.h
+../src/plugins/Directories.o: ../src/core/pinslot.h ../src/core/guid.h
+../src/plugins/Directories.o: ../src/core/tostring.h ../src/core/debugmem.h
+../src/plugins/Directories.o: ../src/core/rcobject.h
+../src/plugins/Directories.o: ../src/core/pinslot_detail.h
+../src/plugins/Directories.o: ../src/core/functionalex.h
+../src/plugins/Directories.o: ../src/core/CoreIntf.h
+../src/plugins/Directories.o: ../src/core/common/stream.h
+../src/plugins/Directories.o: ../src/core/common/stdafx.h
+../src/plugins/Directories.o: ../src/core/common/scummsys.h
+../src/plugins/Directories.o: ../src/core/common/simplefile.h
+../src/plugins/DiskFileProvider.o: ../src/core/common/stdafx.h
+../src/plugins/DiskFileProvider.o: ../src/plugins/DiskFileProvider.h
+../src/plugins/DiskFileProvider.o: ../src/core/pinslot.h ../src/core/guid.h
+../src/plugins/DiskFileProvider.o: ../src/core/tostring.h
+../src/plugins/DiskFileProvider.o: ../src/core/debugmem.h
+../src/plugins/DiskFileProvider.o: ../src/core/rcobject.h
+../src/plugins/DiskFileProvider.o: ../src/core/pinslot_detail.h
+../src/plugins/DiskFileProvider.o: ../src/core/functionalex.h
+../src/plugins/DiskFileProvider.o: ../src/core/CoreIntf.h
+../src/plugins/DiskFileProvider.o: ../src/core/common/stream.h
+../src/plugins/DiskFileProvider.o: ../src/core/common/stdafx.h
+../src/plugins/DiskFileProvider.o: ../src/core/common/scummsys.h
+../src/plugins/DiskFileProvider.o: ../src/core/common/simplefile.h
+../src/plugins/FileTypeRecognizer.o: ../src/core/common/stdafx.h
+../src/plugins/FileTypeRecognizer.o: ../src/core/FileTypeRecognizer.h
+../src/plugins/FileTypeRecognizer.o: ../src/core/pinslot.h ../src/core/guid.h
+../src/plugins/FileTypeRecognizer.o: ../src/core/tostring.h
+../src/plugins/FileTypeRecognizer.o: ../src/core/debugmem.h
+../src/plugins/FileTypeRecognizer.o: ../src/core/rcobject.h
+../src/plugins/FileTypeRecognizer.o: ../src/core/pinslot_detail.h
+../src/plugins/FileTypeRecognizer.o: ../src/core/functionalex.h
+../src/plugins/FileTypeRecognizer.o: ../src/core/CoreIntf.h
+../src/plugins/FileTypeRecognizer.o: ../src/core/common/stream.h
+../src/plugins/FileTypeRecognizer.o: ../src/core/common/stdafx.h
+../src/plugins/FileTypeRecognizer.o: ../src/core/common/scummsys.h
+../src/plugins/FileTypeRecognizer.o: ../src/core/CoreFileTypes.h
+../src/plugins/FileTypeRecognizer.o: ../src/core/safe_static.h
+../src/plugins/FileTypeRecognizer.o: ../src/plugins/VirtualNode.h
+../src/plugins/FileTypeRecognizer.o: ../src/core/ochain.h
+../src/plugins/GUIIntf.o: ../src/core/common/stdafx.h
+../src/plugins/GUIIntf.o: ../src/plugins/GUIIntf.h ../src/core/pinslot.h
+../src/plugins/GUIIntf.o: ../src/core/guid.h ../src/core/tostring.h
+../src/plugins/GUIIntf.o: ../src/core/debugmem.h ../src/core/rcobject.h
+../src/plugins/GUIIntf.o: ../src/core/pinslot_detail.h
+../src/plugins/GUIIntf.o: ../src/core/functionalex.h
+../src/plugins/ftregistry.o: ../src/core/common/stdafx.h
+../src/plugins/ftregistry.o: ../src/core/ftregistry.h ../src/core/plugin.h
+../src/plugins/ftregistry.o: ../src/core/guid.h ../src/core/pinslot.h
+../src/plugins/ftregistry.o: ../src/core/tostring.h ../src/core/debugmem.h
+../src/plugins/ftregistry.o: ../src/core/rcobject.h
+../src/plugins/ftregistry.o: ../src/core/pinslot_detail.h
+../src/plugins/ftregistry.o: ../src/core/functionalex.h
+../src/plugins/ftregistry.o: ../src/core/plugin_detail.h
+../src/plugins/ftregistry.o: ../src/core/FileTypeRecognizer.h
+../src/plugins/ftregistry.o: ../src/core/CoreIntf.h
+../src/plugins/ftregistry.o: ../src/core/common/stream.h
+../src/plugins/ftregistry.o: ../src/core/common/stdafx.h
+../src/plugins/ftregistry.o: ../src/core/common/scummsys.h
+../src/plugins/ftregistry.o: ../src/core/CoreFileTypes.h
+../src/plugins/ftregistry.o: ../src/core/safe_static.h
+../src/plugins/stdafx.o: ../src/core/common/stdafx.h
+../src/plugins/wx2scstream.o: ../src/core/common/stdafx.h
+../src/plugins/wx2scstream.o: ../src/plugins/wx2scstream.h
+../src/plugins/wx2scstream.o: ../src/core/common/stream.h
+../src/plugins/wx2scstream.o: ../src/core/common/stdafx.h
+../src/plugins/wx2scstream.o: ../src/core/common/scummsys.h
+../src/plugins/wx2scstream.o: ../src/core/debugmem.h
+../src/gui/BrowserApp.o: ../src/gui/BrowserApp.h ../src/gui/MainForm.h
+../src/gui/BrowserApp.o: ../src/gui/guicon.h
+../src/gui/DirectoryPresenter.o: ../src/gui/DirectoryPresenter.h
+../src/gui/DirectoryPresenter.o: ../src/core/pinslot.h ../src/core/guid.h
+../src/gui/DirectoryPresenter.o: ../src/core/tostring.h
+../src/gui/DirectoryPresenter.o: ../src/core/debugmem.h
+../src/gui/DirectoryPresenter.o: ../src/core/rcobject.h
+../src/gui/DirectoryPresenter.o: ../src/core/pinslot_detail.h
+../src/gui/DirectoryPresenter.o: ../src/core/functionalex.h
+../src/gui/DirectoryPresenter.o: ../src/core/ochain.h ../src/core/CoreIntf.h
+../src/gui/DirectoryPresenter.o: ../src/core/common/stream.h
+../src/gui/DirectoryPresenter.o: ../src/core/common/stdafx.h
+../src/gui/DirectoryPresenter.o: ../src/core/common/scummsys.h
+../src/gui/DirectoryPresenter.o: ../src/plugins/VirtualNode.h
+../src/gui/DirectoryPresenter.o: ../src/gui/ExplorationTree.h
+../src/gui/DirectoryPresenter.o: ../src/core/oregistry.h ../src/core/plugin.h
+../src/gui/DirectoryPresenter.o: ../src/core/plugin_detail.h
+../src/gui/DirectoryPresenter.o: ../src/core/ftregistry.h
+../src/gui/DirectoryPresenter.o: ../src/core/FileTypeRecognizer.h
+../src/gui/DirectoryPresenter.o: ../src/core/CoreFileTypes.h
+../src/gui/DirectoryPresenter.o: ../src/core/safe_static.h
+../src/gui/ExplorationTree.o: ../src/gui/ExplorationTree.h
+../src/gui/ExplorationTree.o: ../src/gui/PanelProvider.h
+../src/gui/ExplorationTree.o: ../src/core/pinslot.h ../src/core/guid.h
+../src/gui/ExplorationTree.o: ../src/core/tostring.h ../src/core/debugmem.h
+../src/gui/ExplorationTree.o: ../src/core/rcobject.h
+../src/gui/ExplorationTree.o: ../src/core/pinslot_detail.h
+../src/gui/ExplorationTree.o: ../src/core/functionalex.h
+../src/gui/ExplorationTree.o: ../src/plugins/VirtualNode.h
+../src/gui/ExplorationTree.o: ../src/core/CoreIntf.h
+../src/gui/ExplorationTree.o: ../src/core/common/stream.h
+../src/gui/ExplorationTree.o: ../src/core/common/stdafx.h
+../src/gui/ExplorationTree.o: ../src/core/common/scummsys.h
+../src/gui/ExplorationTree.o: ../src/gui/DirectoryPresenter.h
+../src/gui/ExplorationTree.o: ../src/core/ochain.h
+../src/gui/FilePresenter.o: ../src/gui/FilePresenter.h
+../src/gui/FilePresenter.o: ../src/gui/PanelProvider.h ../src/core/pinslot.h
+../src/gui/FilePresenter.o: ../src/core/guid.h ../src/core/tostring.h
+../src/gui/FilePresenter.o: ../src/core/debugmem.h ../src/core/rcobject.h
+../src/gui/FilePresenter.o: ../src/core/pinslot_detail.h
+../src/gui/FilePresenter.o: ../src/core/functionalex.h
+../src/gui/FilePresenter.o: ../src/plugins/VirtualNode.h
+../src/gui/FilePresenter.o: ../src/core/CoreIntf.h
+../src/gui/FilePresenter.o: ../src/core/common/stream.h
+../src/gui/FilePresenter.o: ../src/core/common/stdafx.h
+../src/gui/FilePresenter.o: ../src/core/common/scummsys.h
+../src/gui/ImagePresenter.o: ../src/gui/ImagePresenter.h
+../src/gui/ImagePresenter.o: ../src/gui/PanelProvider.h ../src/core/pinslot.h
+../src/gui/ImagePresenter.o: ../src/core/guid.h ../src/core/tostring.h
+../src/gui/ImagePresenter.o: ../src/core/debugmem.h ../src/core/rcobject.h
+../src/gui/ImagePresenter.o: ../src/core/pinslot_detail.h
+../src/gui/ImagePresenter.o: ../src/core/functionalex.h
+../src/gui/ImagePresenter.o: ../src/plugins/VirtualNode.h
+../src/gui/ImagePresenter.o: ../src/core/CoreIntf.h
+../src/gui/ImagePresenter.o: ../src/core/common/stream.h
+../src/gui/ImagePresenter.o: ../src/core/common/stdafx.h
+../src/gui/ImagePresenter.o: ../src/core/common/scummsys.h
+../src/gui/ImagePresenter.o: ../src/plugins/GUIIntf.h
+../src/gui/ImagePresenter.o: ../src/plugins/BitmapPanel.h
+../src/gui/MainForm.o: ../src/gui/MainForm.h ../src/gui/ExplorationTree.h
+../src/gui/MainForm.o: ../src/core/ftregistry.h ../src/core/plugin.h
+../src/gui/MainForm.o: ../src/core/guid.h ../src/core/pinslot.h
+../src/gui/MainForm.o: ../src/core/tostring.h ../src/core/debugmem.h
+../src/gui/MainForm.o: ../src/core/rcobject.h ../src/core/pinslot_detail.h
+../src/gui/MainForm.o: ../src/core/functionalex.h ../src/core/plugin_detail.h
+../src/gui/MainForm.o: ../src/core/FileTypeRecognizer.h
+../src/gui/MainForm.o: ../src/core/CoreIntf.h ../src/core/common/stream.h
+../src/gui/MainForm.o: ../src/core/common/stdafx.h
+../src/gui/MainForm.o: ../src/core/common/scummsys.h
+../src/gui/MainForm.o: ../src/core/CoreFileTypes.h ../src/core/safe_static.h
+../src/gui/MainForm.o: ../src/core/oregistry.h ../src/plugins/VirtualNode.h
+../src/gui/PanelProvider.o: ../src/gui/PanelProvider.h ../src/core/pinslot.h
+../src/gui/PanelProvider.o: ../src/core/guid.h ../src/core/tostring.h
+../src/gui/PanelProvider.o: ../src/core/debugmem.h ../src/core/rcobject.h
+../src/gui/PanelProvider.o: ../src/core/pinslot_detail.h
+../src/gui/PanelProvider.o: ../src/core/functionalex.h
+../src/gui/PanelProvider.o: ../src/plugins/VirtualNode.h
+../src/gui/PanelProvider.o: ../src/core/CoreIntf.h
+../src/gui/PanelProvider.o: ../src/core/common/stream.h
+../src/gui/PanelProvider.o: ../src/core/common/stdafx.h
+../src/gui/PanelProvider.o: ../src/core/common/scummsys.h
+../src/gui/PanelProvider.o: ../src/gui/ExplorationTree.h
+../src/gui/Test1.o: ../src/gui/MainForm.h ../src/core/plugin.h
+../src/gui/Test1.o: ../src/core/guid.h ../src/core/pinslot.h
+../src/gui/Test1.o: ../src/core/tostring.h ../src/core/debugmem.h
+../src/gui/Test1.o: ../src/core/rcobject.h ../src/core/pinslot_detail.h
+../src/gui/Test1.o: ../src/core/functionalex.h ../src/core/plugin_detail.h
+../src/gui/Test1.o: ../src/core/oregistry.h ../src/gui/ExplorationTree.h
+../src/gui/Test1.o: ../src/plugins/VirtualNode.h ../src/core/CoreIntf.h
+../src/gui/Test1.o: ../src/core/common/stream.h ../src/core/common/stdafx.h
+../src/gui/Test1.o: ../src/core/common/scummsys.h
+../src/gui/Test1.o: ../src/plugins/Directories.h
+../src/gui/Test1.o: ../src/gui/DirectoryPresenter.h ../src/core/ochain.h
+../src/gui/Test1.o: ../src/plugins/BMPParser.h ../src/plugins/GUIIntf.h
+../src/gui/Test1.o: ../src/gui/ImagePresenter.h ../src/gui/PanelProvider.h
+../src/gui/Test1.o: ../src/gui/FilePresenter.h
+../src/gui/Test1.o: ../src/core/FileTypeRecognizer.h
+../src/gui/Test1.o: ../src/core/CoreFileTypes.h ../src/core/safe_static.h
+../src/gui/VirtualNode.o: ../src/plugins/VirtualNode.h ../src/core/pinslot.h
+../src/gui/VirtualNode.o: ../src/core/guid.h ../src/core/tostring.h
+../src/gui/VirtualNode.o: ../src/core/debugmem.h ../src/core/rcobject.h
+../src/gui/VirtualNode.o: ../src/core/pinslot_detail.h
+../src/gui/VirtualNode.o: ../src/core/functionalex.h ../src/core/CoreIntf.h
+../src/gui/VirtualNode.o: ../src/core/common/stream.h
+../src/gui/VirtualNode.o: ../src/core/common/stdafx.h
+../src/gui/VirtualNode.o: ../src/core/common/scummsys.h
+../src/gui/VirtualNode.o: ../src/gui/ExplorationTree.h
+../src/gui/VirtualNode.o: ../src/core/common/simplefile.h

Modified: scummex/branches/gsoc2007-gameresbrowser/src/core/tostring.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/core/tostring.h	2007-07-04 13:15:03 UTC (rev 27898)
+++ scummex/branches/gsoc2007-gameresbrowser/src/core/tostring.h	2007-07-04 16:41:41 UTC (rev 27899)
@@ -11,19 +11,30 @@
 #include <string>
 #include <sstream> // only for implementation
 
+//struct wxString;
+#include <wx/string.h>
+
 namespace Browser {
 
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
 
 template<typename T>
-inline /* inline just for now */
-std::string toString(T& obj) {
+inline
+std::string toString(const T& obj) {
 	std::ostringstream oss;
 	oss << obj;
 	return oss.str();
 }
 
+template<>
+inline
+std::string toString<wxString>(const wxString& obj) {
+	std::ostringstream oss;
+	oss << obj.mb_str(wxConvUTF8);
+	return oss.str();
+}
+
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
 

Modified: scummex/branches/gsoc2007-gameresbrowser/src/gui/DirectoryPresenter.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/DirectoryPresenter.cpp	2007-07-04 13:15:03 UTC (rev 27898)
+++ scummex/branches/gsoc2007-gameresbrowser/src/gui/DirectoryPresenter.cpp	2007-07-04 16:41:41 UTC (rev 27899)
@@ -50,6 +50,17 @@
 	return true;
 }
 
+void recDel(wxTreeCtrl* tree, const wxTreeItemId& item) {
+	wxTreeItemIdValue cookie;
+	while (true) {
+		wxTreeItemId child = tree->GetFirstChild(item, cookie);
+		if (!child.IsOk())
+			break;
+		recDel(tree, child);
+	}
+	tree->Delete(item);
+}
+
 void DirectoryPresenter::unrealize(ObjectChain* ochain) {
 	if (!isRealized(ochain))
 		return;
@@ -60,10 +71,12 @@
 
 	//is this in the right place? after the kids unrealisation? probably.
 	VirtualNode* node = _inodeprovider->getNode();
-	if ( ! node->getTreeItem().IsOk() )
+	if (! node->getTreeItem().IsOk())
 		std::cout << "ERROR: DirectoryPresenter::unrealize(): bad tree item." << std::endl;
-	else
-		ExplorationTree::_getTree()->DeleteChildren( node->getTreeItem() );
+	else {
+		//ExplorationTree::_getTree()->DeleteChildren( node->getTreeItem() );
+		recDel(ExplorationTree::_getTree(), node->getTreeItem());
+	}
 
 	_directorySlot->releaseInterface();
 	_nodeSlot->releaseInterface();

Modified: scummex/branches/gsoc2007-gameresbrowser/src/gui/FilePresenter.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/FilePresenter.cpp	2007-07-04 13:15:03 UTC (rev 27898)
+++ scummex/branches/gsoc2007-gameresbrowser/src/gui/FilePresenter.cpp	2007-07-04 16:41:41 UTC (rev 27899)
@@ -61,9 +61,10 @@
 	std::string name = ifile->getName();
 	std::string text = name;
 
-	if (ifile->getStream()) {
-		uint32 p = ifile->getStream()->pos();
-		uint32 s = ifile->getStream()->size();
+	Common::SeekableReadStream* stream = ifile->getStream();
+	if (stream) {
+		uint32 p = stream->pos();
+		uint32 s = stream->size();
 		text += " ";
 		text += toString(p) + "/" + toString(s);
 	} else {

Modified: scummex/branches/gsoc2007-gameresbrowser/src/gui/ImagePresenter.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/ImagePresenter.cpp	2007-07-04 13:15:03 UTC (rev 27898)
+++ scummex/branches/gsoc2007-gameresbrowser/src/gui/ImagePresenter.cpp	2007-07-04 16:41:41 UTC (rev 27899)
@@ -58,7 +58,14 @@
 		}
 
 		//std::cout << "  -- bitmap: " << bitmap->getBitmap() << std::endl;
-		_bitmap = new wxBitmap(*iimage->getImage());
+		wxImage* image = iimage->getImage();
+		if (!image) {
+			std::cout << "  -- could not get wxImage from IImage interface" << std::endl;
+			_imageSlot->releaseInterface();
+			return;
+		}
+		
+		_bitmap = new wxBitmap(*image);
 		_imageSlot->releaseInterface();
 	}
 

Modified: scummex/branches/gsoc2007-gameresbrowser/src/gui/Test1.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/Test1.cpp	2007-07-04 13:15:03 UTC (rev 27898)
+++ scummex/branches/gsoc2007-gameresbrowser/src/gui/Test1.cpp	2007-07-04 16:41:41 UTC (rev 27899)
@@ -74,13 +74,13 @@
 	rootDir->addSubDir("data", "data");
 
 	if (doll.IsOk() && doll.FileExists() && doll.IsFileReadable())
-		rootDir->addFile("Doll", doll.GetFullPath().c_str());
+		rootDir->addFile("Doll", toString(doll.GetFullPath()));
 
 	if (dog.IsOk() && dog.FileExists() && dog.IsFileReadable())
-		rootDir->addFile("Dog", dog.GetFullPath().c_str());
+		rootDir->addFile("Dog", toString(dog.GetFullPath()));
 
 	if (foxes.IsOk() && foxes.FileExists() && foxes.IsFileReadable())
-		rootDir->addFile("Foxes", foxes.GetFullPath().c_str());
+		rootDir->addFile("Foxes", toString(foxes.GetFullPath()));
 
 	ObjectRegistry::get()->registerPlugin( &getTest1Plugin, true );
 

Modified: scummex/branches/gsoc2007-gameresbrowser/src/plugins/BMPParser.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/plugins/BMPParser.cpp	2007-07-04 13:15:03 UTC (rev 27898)
+++ scummex/branches/gsoc2007-gameresbrowser/src/plugins/BMPParser.cpp	2007-07-04 16:41:41 UTC (rev 27899)
@@ -32,8 +32,15 @@
 	if (!ifile)
 		return NULL;
 	
-	ifile->getStream()->seek(0, SEEK_SET);
-	wxInputStream* input = new wxScummInputStream(ifile->getStream());
+	Common::SeekableReadStream* stream = ifile->getStream();
+	
+	if (!stream) {
+		_fileSlot->releaseInterface();
+		return NULL;
+	}
+	
+	stream->seek(0, SEEK_SET);
+	wxInputStream* input = new wxScummInputStream(stream);
 
 	wxImage* image = new wxImage();
 	bool res = image->LoadFile(*input, wxBITMAP_TYPE_BMP);

Modified: scummex/branches/gsoc2007-gameresbrowser/src/plugins/Directories.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/plugins/Directories.cpp	2007-07-04 13:15:03 UTC (rev 27898)
+++ scummex/branches/gsoc2007-gameresbrowser/src/plugins/Directories.cpp	2007-07-04 16:41:41 UTC (rev 27899)
@@ -14,6 +14,8 @@
 #include "wx/filesys.h"
 #include "wx/filename.h"
 
+#include "tostring.h"
+
 #include "debugmem.h"
 
 namespace Browser {
@@ -157,7 +159,7 @@
 		//wxFileName fname(dir.GetPath(), found);
 		wxFileName fname(found);
 		wxString dispName = fname.GetFullName();
-		addFile(dispName.c_str(), fname.GetFullPath().c_str());
+		addFile( toString(dispName), toString(fname.GetFullPath()));
 		found = fs.FindNext();
 	}
 
@@ -168,7 +170,7 @@
 		wxFileName fname = wxFileName::DirName(found);
 		wxArrayString dirs = fname.GetDirs();
 		wxString dispName = dirs.Last();
-		addSubDir(dispName.c_str(), fname.GetPath().c_str());
+		addSubDir(toString(dispName), toString(fname.GetPath()));
 		found = fs.FindNext();
 	}
 


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