gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r11616: Drop obsoleted MovieClip::lo


From: Sandro Santilli
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11616: Drop obsoleted MovieClip::loadMovie method
Date: Tue, 10 Nov 2009 18:54:39 +0100
User-agent: Bazaar (1.16.1)

------------------------------------------------------------
revno: 11616 [merge]
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Tue 2009-11-10 18:54:39 +0100
message:
  Drop obsoleted MovieClip::loadMovie method
modified:
  libcore/MovieClip.cpp
  libcore/MovieClip.h
=== modified file 'libcore/MovieClip.cpp'
--- a/libcore/MovieClip.cpp     2009-11-09 21:58:54 +0000
+++ b/libcore/MovieClip.cpp     2009-11-10 07:52:58 +0000
@@ -2076,83 +2076,6 @@
     }
 }
 
-
-
-bool
-MovieClip::loadMovie(const URL& url, const std::string* postdata)
-{
-    // Get a pointer to our own parent 
-    DisplayObject* parent = get_parent();
-    if (parent)
-    {
-        if (postdata)
-        {
-            log_debug(_("Posting data '%s' to url '%s'"), postdata, url.str());
-        }
-        
-        const movie_root& mr = stage();
-
-        boost::intrusive_ptr<movie_definition> md(
-            MovieFactory::makeMovie(url, mr.runResources(), NULL, true, 
postdata));
-
-        if (!md) {
-            log_error(_("can't create movie_definition for %s"),
-                url.str());
-            return false;
-        }
-
-        as_object* us = getObject(this);
-        assert(us);
-
-        Movie* extern_movie = md->createMovie(getGlobal(*us), parent);
-        if (!extern_movie) {
-            log_error(_("can't create extern Movie "
-                "for %s"), url.str());
-            return false;
-        }
-
-        // Parse query string
-        MovieVariables vars;
-        url.parse_querystring(url.querystring(), vars);
-        extern_movie->setVariables(vars);
-
-        // Set lockroot to our value of it
-        extern_movie->setLockRoot(getLockRoot());
-
-        // Copy event handlers
-        // see testsuite/misc-ming.all/loadMovieTest.swf
-        const Events& clipEvs = get_event_handlers();
-        // top-level movies can't have clip events, right ?
-        assert (extern_movie->get_event_handlers().empty());
-        extern_movie->set_event_handlers(clipEvs);
-
-        const std::string& name = get_name();
-        assert (parent == extern_movie->get_parent());
-
-        MovieClip* parent_sp = parent->to_movie();
-        assert(parent_sp);
-       
-        if( !name.empty() )
-        {
-            // TODO: check empty != none...
-            extern_movie->set_name(name);
-        }
-        extern_movie->set_clip_depth(get_clip_depth());
-    
-        parent_sp->replace_display_object(extern_movie, get_depth(),
-                     true, true);
-    }
-    else
-    {
-        const size_t level = get_depth() - DisplayObject::staticDepthOffset;
-        
-        // how about lockRoot here ?
-        stage().loadLevel(level, url); // extern_movie.get());
-    }
-
-    return true;
-}
-
 void 
 MovieClip::loadVariables(const std::string& urlstr, 
         VariablesMethod sendVarsMethod)

=== modified file 'libcore/MovieClip.h'
--- a/libcore/MovieClip.h       2009-11-08 13:13:45 +0000
+++ b/libcore/MovieClip.h       2009-11-10 07:52:58 +0000
@@ -465,22 +465,6 @@
         METHOD_POST
     };
 
-    /// Load a movie in this sprite, replacing it
-    //
-    /// @param url
-    ///  The url to load the movie from. Can be a bitmap or an SWF.
-    ///
-    /// @param postdata
-    ///  IF not NULL, use as the POST body for HTTP requests
-    ///
-    /// Return: true if it succeeded, false otherwise
-    ///
-    /// @deprecated use movie_root::loadMovie instead to queue
-    ///             a load and getLoadedMovie to have objects of
-    ///             this class receive a loaded external movie
-    ///     
-    bool loadMovie(const URL& url, const std::string* postdata=NULL);
-
     // See dox in DisplayObject.h
     virtual void getLoadedMovie(Movie* newMovie);
 


reply via email to

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