CVSROOT: /sources/gnash Module name: gnash Branch: release_0_8_1 Changes by: Sandro Santilli <strk> 07/08/19 20:32:28
Modified files: . : ChangeLog server/vm : ASHandlers.cpp Log message: * server/vm/ASHandlers.cpp (CommonGetUrl): backport a copy from head. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.3971.2.41&r2=1.3971.2.42 http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.cpp?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.118.2.1&r2=1.118.2.2 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.3971.2.41 retrieving revision 1.3971.2.42 diff -u -b -r1.3971.2.41 -r1.3971.2.42 --- ChangeLog 19 Aug 2007 20:31:23 -0000 1.3971.2.41 +++ ChangeLog 19 Aug 2007 20:32:27 -0000 1.3971.2.42 @@ -1,3 +1,8 @@ +2007-08-19 Sandro Santilli <[EMAIL PROTECTED]> + + * server/vm/ASHandlers.cpp (CommonGetUrl): backport a copy from + head. + 2007-08-19 Markus Gothe <[EMAIL PROTECTED]> * testsuite/libbase/Makefile.am, Index: server/vm/ASHandlers.cpp =================================================================== RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v retrieving revision 1.118.2.1 retrieving revision 1.118.2.2 diff -u -b -r1.118.2.1 -r1.118.2.2 --- server/vm/ASHandlers.cpp 18 Aug 2007 21:52:33 -0000 1.118.2.1 +++ server/vm/ASHandlers.cpp 19 Aug 2007 20:32:27 -0000 1.118.2.2 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: ASHandlers.cpp,v 1.118.2.1 2007/08/18 21:52:33 strk Exp $ */ +/* $Id: ASHandlers.cpp,v 1.118.2.2 2007/08/19 20:32:27 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1731,6 +1731,9 @@ // NOTE: this is affected by the GetUrl bug reported with an excerpt // from Colin Moock book, see below. (won't work, and won't fix) // +// - http://www.uptoten.com +// Should load in _level0, with loadTargetFlag set. +// void SWFHandlers::CommonGetUrl(as_environment& env, as_value target, // the target window, or _level1..10 @@ -1896,6 +1899,43 @@ " with no loadTargetFlag"), sendVarsMethod); } + + if ( target_string.compare(0, 6, "_level") == 0 && target_string.find_first_not_of("0123456789", 7) == string::npos ) + { + unsigned int levelno = atoi(target_string.c_str()+6); + log_debug(_("Testing _level loading (level %u)"), levelno); + VM::get().getRoot().loadLevel(levelno, url); + return; + } + +#ifndef __OS2__x + string command = "firefox -remote \"openurl("; +#else // def __OS2__x + static char browserExe[ 255 ] = ""; + + if ( browserExe[0] == 0 ) + { + PrfQueryProfileString( HINI_USER, (PSZ) "WPURLDEFAULTSETTINGS", + (PSZ) "DefaultBrowserExe", NULL, + (PVOID) browserExe, (LONG)sizeof(browserExe) ); + } + + string command = browserExe; + command += " -remote \"openurl("; +#endif // def __OS2__x + + command += url.str(); + +#if 0 // target testing TODO: should we enable this by default? + if ( ! target_string.empty() ) + { + command += ", " + target_string; + } +#endif + command += ")\""; + log_msg (_("Launching URL... %s"), command.c_str()); + system(command.c_str()); + } // Common code for SetTarget and SetTargetExpression. See: _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit