gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog gui/NullGui.cpp gui/NullGui.h g...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog gui/NullGui.cpp gui/NullGui.h g...
Date: Mon, 02 Jul 2007 22:10:16 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/07/02 22:10:16

Modified files:
        .              : ChangeLog 
        gui            : NullGui.cpp NullGui.h gui.cpp 

Log message:
                * gui/NullGui.{h,cpp}: implement quit(), for clean shutdown.
                * gui/gui.cpp (advance_movie): use quit() to exit

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3640&r2=1.3641
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/NullGui.cpp?cvsroot=gnash&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/NullGui.h?cvsroot=gnash&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.83&r2=1.84

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3640
retrieving revision 1.3641
diff -u -b -r1.3640 -r1.3641
--- ChangeLog   2 Jul 2007 18:36:42 -0000       1.3640
+++ ChangeLog   2 Jul 2007 22:10:16 -0000       1.3641
@@ -1,5 +1,10 @@
 2007-07-02 Sandro Santilli <address@hidden>
 
+       * gui/NullGui.{h,cpp}: implement quit(), for clean shutdown.
+       * gui/gui.cpp (advance_movie): use quit() to exit
+
+2007-07-02 Sandro Santilli <address@hidden>
+
        * gui/gnash.cpp (parseCommandLine): support floating point argument
          to -f switch.
 

Index: gui/NullGui.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/NullGui.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- gui/NullGui.cpp     1 Jul 2007 10:54:00 -0000       1.9
+++ gui/NullGui.cpp     2 Jul 2007 22:10:16 -0000       1.10
@@ -72,6 +72,10 @@
                // TODO: use the timer value to trigger advances
                usleep(_interval*1000);
                Gui::advance_movie(this);
+
+               // when runnign gnash with -1 switch ::advance_movie() will 
call ::quit()
+               // at last frame
+               if ( _quit ) break;
        }
        return false;
 }

Index: gui/NullGui.h
===================================================================
RCS file: /sources/gnash/gnash/gui/NullGui.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- gui/NullGui.h       1 Jul 2007 10:54:00 -0000       1.12
+++ gui/NullGui.h       2 Jul 2007 22:10:16 -0000       1.13
@@ -39,7 +39,8 @@
        NullGui(bool do_loop)
                :
                Gui(0,0,do_loop,0),
-               _timeout(0)
+               _timeout(0),
+               _quit(false)
        {}
 
        ~NullGui() {}
@@ -61,10 +62,15 @@
        bool setupEvents()  { return true; }
        void renderBuffer()  { }
 
+       void quit() { _quit = true; }
+
 private:
 
        /// timeout value, in milliseconds
        unsigned int _timeout;
+
+       /// True when we quit
+       bool _quit;
 };
 
 } // end of gnash namespace

Index: gui/gui.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.cpp,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -b -r1.83 -r1.84
--- gui/gui.cpp 2 Jul 2007 18:32:53 -0000       1.83
+++ gui/gui.cpp 2 Jul 2007 22:10:16 -0000       1.84
@@ -511,7 +511,7 @@
                gnash::sprite_instance* si = m->get_root_movie();
                if (curframe + 1 >= si->get_frame_count())
                {
-                   exit(0); // TODO: quit in a more gentile fashion.
+                       gui->quit(); 
                }
        }
 




reply via email to

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