Update of /cvsroot/openvrml/openvrml/src/openvrml-gtkplug
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2396/src/openvrml-gtkplug
Modified Files:
main.cpp
Log Message:
Added load-url command to openvrml-gtkplug; this facilitates loading a new world into an existing component instance.
Index: main.cpp
===================================================================
RCS file: /cvsroot/openvrml/openvrml/src/openvrml-gtkplug/main.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** main.cpp 4 Jan 2007 06:34:01 -0000 1.10
--- main.cpp 23 Jan 2007 05:52:07 -0000 1.11
***************
*** 135,138 ****
--- 135,150 ----
pos->second->buf_.put(this->in_->get());
}
+ } else if (command == "load-url") {
+ string url;
+ command_line_stream >> url;
+
+ const gchar * urls[] = { g_strdup(url.c_str()), 0 };
+ scope_guard urls_guard =
+ make_guard(g_free,
+ const_cast<void *>(
+ static_cast<const void *>(urls[0])));
+ boost::ignore_unused_variable_warning(urls_guard);
+
+ gtk_vrml_browser_load_url(this->vrml_browser_, urls, 0);
}
}
|