gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog gui/gui.cpp server/movie_root.c...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog gui/gui.cpp server/movie_root.c...
Date: Mon, 01 Oct 2007 22:04:42 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/10/01 22:04:42

Modified files:
        .              : ChangeLog 
        gui            : gui.cpp 
        server         : movie_root.cpp movie_root.h 

Log message:
                * server/movie_root.{cpp,h}: add a clear() method for clearing
                  everything managed by the movie_root/stage. Intended to be 
called
                  right before a brand new setRootMovie call (for restart).
                * gui/gui.cpp (menu_restart): get a real restart, including 
flash
                  variables settings and sure about the real initial 
movie_definition
                  that started everything.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4494&r2=1.4495
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.103&r2=1.104
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.cpp?cvsroot=gnash&r1=1.100&r2=1.101
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.h?cvsroot=gnash&r1=1.77&r2=1.78

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4494
retrieving revision 1.4495
diff -u -b -r1.4494 -r1.4495
--- ChangeLog   1 Oct 2007 21:47:03 -0000       1.4494
+++ ChangeLog   1 Oct 2007 22:04:40 -0000       1.4495
@@ -1,5 +1,14 @@
 2007-10-01 Sandro Santilli <address@hidden>
 
+       * server/movie_root.{cpp,h}: add a clear() method for clearing
+         everything managed by the movie_root/stage. Intended to be called
+         right before a brand new setRootMovie call (for restart).
+       * gui/gui.cpp (menu_restart): get a real restart, including flash
+         variables settings and sure about the real initial movie_definition
+         that started everything.
+
+2007-10-01 Sandro Santilli <address@hidden>
+
        * gui/gui.{cpp,h}: add movie_definition and movie_root members,
          add _started member to postpone kick-start (movie_root::setRootMovie
          call) in case we started in "stop" mode [ fixed bug #21212 ].

Index: gui/gui.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.cpp,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -b -r1.103 -r1.104
--- gui/gui.cpp 1 Oct 2007 21:47:04 -0000       1.103
+++ gui/gui.cpp 1 Oct 2007 22:04:41 -0000       1.104
@@ -153,9 +153,13 @@
 Gui::menu_restart()
 {
 //    GNASH_REPORT_FUNCTION;
-       _stage->restart();
 
-    // TODO: see ::start() for a clean way to restart (including setting flash 
vars)
+       _stage->clear();
+       _started = false;
+       start();
+
+       //_stage->restart();
+
 }
 
 void

Index: server/movie_root.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.cpp,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -b -r1.100 -r1.101
--- server/movie_root.cpp       27 Sep 2007 10:44:45 -0000      1.100
+++ server/movie_root.cpp       1 Oct 2007 22:04:41 -0000       1.101
@@ -184,6 +184,26 @@
 }
 
 void
+movie_root::clear()
+{
+       // wipe out live chars
+       _liveChars.clear();
+
+       // wipe out queued actions
+       _actionQueue.clear();
+
+       // wipe out all levels
+       _movies.clear();
+
+#ifdef GNASH_USE_GC
+       // Run the garbage collector again
+       GC::get().collect();
+#endif
+
+       setInvalidated();
+}
+
+void
 movie_root::restart()
 {
        // wipe out live chars

Index: server/movie_root.h
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.h,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -b -r1.77 -r1.78
--- server/movie_root.h 27 Sep 2007 10:44:45 -0000      1.77
+++ server/movie_root.h 1 Oct 2007 22:04:41 -0000       1.78
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: movie_root.h,v 1.77 2007/09/27 10:44:45 strk Exp $ */
+/* $Id: movie_root.h,v 1.78 2007/10/01 22:04:41 strk Exp $ */
 
 /// \page events_handling Handling of user events
 ///
@@ -570,6 +570,13 @@
         _liveChars.push_front(ch);
     }
 
+    /// Cleanup all resources and run the GC collector
+    //
+    /// This method should be invoked before calling setRootMovie again
+    /// for a clean restart.
+    ///
+    void clear();
+
 private:
 
     /// An element of the advanceable characters




reply via email to

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