gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog testsuite/MovieTester.cpp


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/MovieTester.cpp
Date: Sat, 29 Dec 2007 13:15:14 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/12/29 13:15:13

Modified files:
        .              : ChangeLog 
        testsuite      : MovieTester.cpp 

Log message:
        allow loading initial movie (local sandboxes..)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5269&r2=1.5270
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/MovieTester.cpp?cvsroot=gnash&r1=1.63&r2=1.64

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5269
retrieving revision 1.5270
diff -u -b -r1.5269 -r1.5270
--- ChangeLog   29 Dec 2007 13:02:58 -0000      1.5269
+++ ChangeLog   29 Dec 2007 13:15:12 -0000      1.5270
@@ -1,5 +1,7 @@
 2007-12-29 Sandro Santilli <address@hidden>
 
+       * testsuite/MovieTester.cpp: allow loading initial movie
+         (local sandboxes..)
        * utilities/processor.cpp: add main movie base dir
          to local sandboxes, or gprocessor won't be able to 
          play anything not explicitly in the sandboxes list.

Index: testsuite/MovieTester.cpp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/MovieTester.cpp,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- testsuite/MovieTester.cpp   18 Dec 2007 00:07:11 -0000      1.63
+++ testsuite/MovieTester.cpp   29 Dec 2007 13:15:13 -0000      1.64
@@ -76,8 +76,23 @@
        }
        else
        {
+               URL urlObj(url);
+               if ( urlObj.protocol() == "file" )
+               {
+                       RcInitFile& rcfile = RcInitFile::getDefaultInstance();
+                       const std::string& path = urlObj.path();
+#if 1 // add the *directory* the movie was loaded from to the local sandbox 
path
+                       size_t lastSlash = path.find_last_of('/');
+                       std::string dir = path.substr(0, lastSlash+1);
+                       rcfile.addLocalSandboxPath(dir);
+                       log_debug(_("%s appended to local sandboxes"), 
dir.c_str());
+#else // add the *file* to be loaded to the local sandbox path
+                       rcfile.addLocalSandboxPath(path);
+                       log_debug(_("%s appended to local sandboxes"), 
path.c_str());
+#endif
+               }
                // _url should be always set at this point...
-               _movie_def = gnash::create_library_movie(URL(url), NULL, false);
+               _movie_def = gnash::create_library_movie(urlObj, NULL, false);
        }
 
        if ( ! _movie_def )




reply via email to

[Prev in Thread] Current Thread [Next in Thread]