|
From: <br...@us...> - 2008-07-20 09:07:15
|
Revision: 3491
http://openvrml.svn.sourceforge.net/openvrml/?rev=3491&view=rev
Author: braden
Date: 2008-07-20 09:06:49 +0000 (Sun, 20 Jul 2008)
Log Message:
-----------
Updated FreeType dependency to 2.3.6; ignore default library "msvcrt" in the Debug configuration.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-07-20 06:41:31 UTC (rev 3490)
+++ branches/0.17/ChangeLog 2008-07-20 09:06:49 UTC (rev 3491)
@@ -1,3 +1,9 @@
+2008-07-20 Braden McDaniel <br...@en...>
+
+ * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj:
+ Updated FreeType dependency to 2.3.6; ignore default library
+ "msvcrt" in the Debug configuration.
+
2008-06-17 Braden McDaniel <br...@en...>
Updates for 0.17.6 release.
Modified: branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj
===================================================================
--- branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj 2008-07-20 06:41:31 UTC (rev 3490)
+++ branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj 2008-07-20 09:06:49 UTC (rev 3491)
@@ -67,9 +67,9 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="gdi32.lib advapi32.lib shell32.lib libpngd.lib zlibd.lib freetype235MT_D.lib"
+ AdditionalDependencies="gdi32.lib advapi32.lib shell32.lib libpngd.lib zlibd.lib freetype236MT_D.lib"
OutputFile="$(SolutionDir)..\bin\$(ProjectName)d.dll"
- IgnoreDefaultLibraryNames="libcmtd"
+ IgnoreDefaultLibraryNames="libcmtd;msvcrt"
GenerateDebugInformation="true"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
@@ -151,7 +151,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="gdi32.lib advapi32.lib shell32.lib libpng.lib zlib.lib freetype235MT.lib"
+ AdditionalDependencies="gdi32.lib advapi32.lib shell32.lib libpng.lib zlib.lib freetype236MT.lib"
OutputFile="$(SolutionDir)..\bin\$(ProjectName).dll"
IgnoreDefaultLibraryNames="libcmt"
GenerateDebugInformation="true"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-07-20 09:37:09
|
Revision: 3492
http://openvrml.svn.sourceforge.net/openvrml/?rev=3492&view=rev
Author: braden
Date: 2008-07-20 09:37:02 +0000 (Sun, 20 Jul 2008)
Log Message:
-----------
Added parentheses to quell warnings from gcc 4.3.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/src/libopenvrml/openvrml/vrml97_grammar.h
branches/0.17/src/libopenvrml/openvrml/x3d_vrml_grammar.h
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-07-20 09:06:49 UTC (rev 3491)
+++ branches/0.17/ChangeLog 2008-07-20 09:37:02 UTC (rev 3492)
@@ -1,5 +1,12 @@
2008-07-20 Braden McDaniel <br...@en...>
+ Added parentheses to quell warnings from gcc 4.3.
+
+ * src/libopenvrml/openvrml/x3d_vrml_grammar.h
+ * src/libopenvrml/openvrml/vrml97_grammar.h
+
+2008-07-20 Braden McDaniel <br...@en...>
+
* ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj:
Updated FreeType dependency to 2.3.6; ignore default library
"msvcrt" in the Debug configuration.
Modified: branches/0.17/src/libopenvrml/openvrml/vrml97_grammar.h
===================================================================
--- branches/0.17/src/libopenvrml/openvrml/vrml97_grammar.h 2008-07-20 09:06:49 UTC (rev 3491)
+++ branches/0.17/src/libopenvrml/openvrml/vrml97_grammar.h 2008-07-20 09:37:02 UTC (rev 3492)
@@ -669,7 +669,7 @@
rule_t rule
= lexeme_d[
chlit<>('"') >> *(strlit<>("\\\"")
- | anychar_p - chlit<>('"'))
+ | (anychar_p - chlit<>('"')))
>> chlit<>('"')
][var(result) = get_string_content(arg1, arg2)]
;
@@ -2805,8 +2805,8 @@
= lexeme_d[
((anychar_p - vrml97_space_p - invalid_id_first_char)
>> *(anychar_p - vrml97_space_p - invalid_id_rest_char))
- - (keywords >> anychar_p - (anychar_p - vrml97_space_p
- - invalid_id_rest_char))
+ - (keywords >> (anychar_p - (anychar_p - vrml97_space_p
+ - invalid_id_rest_char)))
]
;
Modified: branches/0.17/src/libopenvrml/openvrml/x3d_vrml_grammar.h
===================================================================
--- branches/0.17/src/libopenvrml/openvrml/x3d_vrml_grammar.h 2008-07-20 09:06:49 UTC (rev 3491)
+++ branches/0.17/src/libopenvrml/openvrml/x3d_vrml_grammar.h 2008-07-20 09:37:02 UTC (rev 3492)
@@ -880,8 +880,8 @@
((anychar_p - vrml97_space_p - invalid_id_first_char)
>> *(anychar_p - vrml97_space_p - invalid_id_rest_char))
- (keywords
- >> anychar_p - (anychar_p - vrml97_space_p
- - invalid_id_rest_char))
+ >> (anychar_p - (anychar_p - vrml97_space_p
+ - invalid_id_rest_char)))
]
;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-07-20 09:41:06
|
Revision: 3493
http://openvrml.svn.sourceforge.net/openvrml/?rev=3493&view=rev
Author: braden
Date: 2008-07-20 09:41:08 +0000 (Sun, 20 Jul 2008)
Log Message:
-----------
Added a comment to note that no translation of URI-encoded characters is being done.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/examples/sdl_viewer.cpp
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-07-20 09:37:02 UTC (rev 3492)
+++ branches/0.17/ChangeLog 2008-07-20 09:41:08 UTC (rev 3493)
@@ -1,5 +1,11 @@
2008-07-20 Braden McDaniel <br...@en...>
+ * examples/sdl_viewer.cpp (resource_fetcher::do_get_resource(const
+ std::string &)): Added a comment to note that no translation of
+ URI-encoded characters is being done.
+
+2008-07-20 Braden McDaniel <br...@en...>
+
Added parentheses to quell warnings from gcc 4.3.
* src/libopenvrml/openvrml/x3d_vrml_grammar.h
Modified: branches/0.17/examples/sdl_viewer.cpp
===================================================================
--- branches/0.17/examples/sdl_viewer.cpp 2008-07-20 09:37:02 UTC (rev 3492)
+++ branches/0.17/examples/sdl_viewer.cpp 2008-07-20 09:41:08 UTC (rev 3493)
@@ -217,6 +217,10 @@
// should confirm that it is localhost, the machine name, or zero
// length.
//
+ // We also don't do any translation of URI-encoded characters here.
+ // That means that things like paths with spaces in them aren't going
+ // to work. Oh, well.
+ //
string::size_type path_start_index =
# ifdef _WIN32
uri.find_first_of('/', authority_start_index) + 1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-07-20 09:43:55
|
Revision: 3494
http://openvrml.svn.sourceforge.net/openvrml/?rev=3494&view=rev
Author: braden
Date: 2008-07-20 09:43:51 +0000 (Sun, 20 Jul 2008)
Log Message:
-----------
Apply OPENVRML_API to symbols that libglade needs.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/src/openvrml-player/player.cpp
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-07-20 09:41:08 UTC (rev 3493)
+++ branches/0.17/ChangeLog 2008-07-20 09:43:51 UTC (rev 3494)
@@ -1,5 +1,10 @@
2008-07-20 Braden McDaniel <br...@en...>
+ * src/openvrml-player/player.cpp: Apply OPENVRML_API to symbols
+ that libglade needs.
+
+2008-07-20 Braden McDaniel <br...@en...>
+
* examples/sdl_viewer.cpp (resource_fetcher::do_get_resource(const
std::string &)): Added a comment to note that no translation of
URI-encoded characters is being done.
Modified: branches/0.17/src/openvrml-player/player.cpp
===================================================================
--- branches/0.17/src/openvrml-player/player.cpp 2008-07-20 09:41:08 UTC (rev 3493)
+++ branches/0.17/src/openvrml-player/player.cpp 2008-07-20 09:43:51 UTC (rev 3494)
@@ -46,14 +46,16 @@
// GTK+ signal handlers; libglade needs them to have external linkage in
// order to connect them.
//
- void openvrml_player_on_about_activated(GtkWindow * window);
- void openvrml_player_on_file_open_activated(
+ OPENVRML_API void openvrml_player_on_about_activated(GtkWindow * window);
+ OPENVRML_API void openvrml_player_on_file_open_activated(
OpenvrmlPlayerFileChooserDialog * dialog);
- void openvrml_player_on_locationentry_activated(GtkEntry * entry);
- void openvrml_player_on_filechooserdialog_response(GtkDialog * dialog,
- gint arg1,
- gpointer user_data);
- void openvrml_player_quit();
+ OPENVRML_API void
+ openvrml_player_on_locationentry_activated(GtkEntry * entry);
+ OPENVRML_API void
+ openvrml_player_on_filechooserdialog_response(GtkDialog * dialog,
+ gint arg1,
+ gpointer user_data);
+ OPENVRML_API void openvrml_player_quit();
//
// The following functions are 'extern "C"' because they get passed as
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-07-26 20:20:06
|
Revision: 3498
http://openvrml.svn.sourceforge.net/openvrml/?rev=3498&view=rev
Author: braden
Date: 2008-07-26 20:20:15 +0000 (Sat, 26 Jul 2008)
Log Message:
-----------
Fixed some potential crashes when processing coordinate, color, and normal indices.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/src/libopenvrml-gl/openvrml/gl/viewer.cpp
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-07-26 08:29:32 UTC (rev 3497)
+++ branches/0.17/ChangeLog 2008-07-26 20:20:15 UTC (rev 3498)
@@ -1,3 +1,24 @@
+2008-07-26 Braden McDaniel <br...@en...>
+
+ Fixed some potential crashes when processing coordinate, color,
+ and normal indices.
+
+ * src/libopenvrml-gl/openvrml/gl/viewer.cpp
+ (insertShellTess(GLUtesselator &, const std::vector<vertex_data>&,
+ const std::vector<openvrml::int32> &, bool, const
+ std::vector<openvrml::color> &, const
+ std::vector<openvrml::int32>&, bool, const
+ std::vector<openvrml::vec3f> &, const
+ std::vector<openvrml::int32>&)): Advance past invalid coordinate
+ indices.
+ (openvrml::gl::viewer::do_insert_shell(unsigned int, const
+ std::vector<vec3f> &, const std::vector<int32> &, const
+ std::vector<color> &, const std::vector<int32> &, const
+ std::vector<vec3f> & const std::vector<int32> &, const
+ std::vector<vec2f> &, const std::vector<int32> &)): Advance past
+ -1 entries and invalid coordinate indices in the colorIndex and
+ normalIndex fields.
+
2008-07-20 Braden McDaniel <br...@en...>
* src/openvrml-player/player.cpp: Apply OPENVRML_API to symbols
Modified: branches/0.17/src/libopenvrml-gl/openvrml/gl/viewer.cpp
===================================================================
--- branches/0.17/src/libopenvrml-gl/openvrml/gl/viewer.cpp 2008-07-26 08:29:32 UTC (rev 3497)
+++ branches/0.17/src/libopenvrml-gl/openvrml/gl/viewer.cpp 2008-07-26 20:20:15 UTC (rev 3498)
@@ -2939,7 +2939,14 @@
for (vector<openvrml::int32>::size_type i = 0;
i < coord_index.size();
++i) {
- if (coord_index[i] != -1) {
+ using openvrml::int32;
+ if (!(coord_index[i] < int32(vertices.size()))) {
+ //
+ // We've encountered an invalid coordinate index. Advance to
+ // the next polygon.
+ //
+ while (coord_index[i + 1] != -1) { ++i; }
+ } else if (coord_index[i] != -1) {
gluTessVertex(&tessobj,
const_cast<GLdouble *>(
vertices[coord_index[i]].coord),
@@ -3060,11 +3067,13 @@
++i) {
vertices[i].color = &color[i];
}
- } else {
+ } else if (color_index.size() == coord_index.size()) {
for (vector<int32>::size_type i = 0;
i < color_index.size();
++i) {
- vertices[i].color = &color[color_index[i]];
+ if (color_index[i] < 0) { continue; }
+ if (!(coord_index[i] < coord.size())) { continue; }
+ vertices[coord_index[i]].color = &color[color_index[i]];
}
}
}
@@ -3075,11 +3084,13 @@
++i) {
vertices[i].normal = &normal[i];
}
- } else {
+ } else if (normal_index.size() == coord_index.size()) {
for (vector<int32>::size_type i = 0;
i < normal_index.size();
++i) {
- vertices[i].normal = &normal[normal_index[i]];
+ if (normal_index[i] < 0) { continue; }
+ if (!(coord_index[i] < coord.size())) { continue; }
+ vertices[coord_index[i]].normal = &normal[normal_index[i]];
}
}
}
@@ -3094,6 +3105,7 @@
for (vector<int32>::size_type i = 0;
i < tex_coord_index.size();
++i) {
+ if (tex_coord_index[i] < 0) { continue; }
vertices[tex_coord_index[i]].tex_coord =
&tex_coord[tex_coord_index[i]];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-08-12 10:15:18
|
Revision: 3500
http://openvrml.svn.sourceforge.net/openvrml/?rev=3500&view=rev
Author: braden
Date: 2008-08-12 10:15:26 +0000 (Tue, 12 Aug 2008)
Log Message:
-----------
Use G_DEFINE_TYPE for custom GTK+ widgets.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/src/openvrml-player/filechooserdialog.cpp
branches/0.17/src/openvrml-xembed/gtkvrmlbrowser.cpp
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-08-03 06:58:14 UTC (rev 3499)
+++ branches/0.17/ChangeLog 2008-08-12 10:15:26 UTC (rev 3500)
@@ -1,3 +1,10 @@
+2008-08-12 Braden McDaniel <br...@en...>
+
+ Use G_DEFINE_TYPE for custom GTK+ widgets.
+
+ * src/openvrml-xembed/gtkvrmlbrowser.cpp
+ * src/openvrml-player/filechooserdialog.cpp
+
2008-07-26 Braden McDaniel <br...@en...>
Fixed some potential crashes when processing coordinate, color,
Modified: branches/0.17/src/openvrml-player/filechooserdialog.cpp
===================================================================
--- branches/0.17/src/openvrml-player/filechooserdialog.cpp 2008-08-03 06:58:14 UTC (rev 3499)
+++ branches/0.17/src/openvrml-player/filechooserdialog.cpp 2008-08-12 10:15:26 UTC (rev 3500)
@@ -23,29 +23,10 @@
using namespace boost::multi_index::detail; // for scope_guard
-namespace {
- G_GNUC_INTERNAL void class_init(gpointer g_class, gpointer class_data);
- G_GNUC_INTERNAL void init(GTypeInstance * instance, gpointer g_class);
-}
+G_DEFINE_TYPE(OpenvrmlPlayerFileChooserDialog,
+ openvrml_player_file_chooser_dialog,
+ GTK_TYPE_FILE_CHOOSER_DIALOG)
-GtkType openvrml_player_file_chooser_dialog_get_type()
-{
- static GtkType type = 0;
-
- if (G_UNLIKELY(!type)) {
- type =
- g_type_register_static_simple(
- GTK_TYPE_FILE_CHOOSER_DIALOG,
- "OpenvrmlPlayerFileChooserDialog",
- sizeof (OpenvrmlPlayerFileChooserDialogClass),
- class_init,
- sizeof (OpenvrmlPlayerFileChooserDialog),
- init,
- GTypeFlags(0));
- }
- return type;
-}
-
GtkWidget * openvrml_player_file_chooser_dialog_new(GtkWindow * parent)
{
GtkWidget * const dialog =
@@ -96,17 +77,11 @@
return dialog;
}
-namespace {
+void
+openvrml_player_file_chooser_dialog_class_init(
+ OpenvrmlPlayerFileChooserDialogClass *)
+{}
- G_GNUC_INTERNAL GtkWidgetClass * parent_class;
-
- void class_init(const gpointer g_class, gpointer /* class_data */)
- {
- ::parent_class =
- static_cast<GtkWidgetClass *>(
- g_type_class_peek_parent(G_OBJECT_CLASS(g_class)));
- }
-
- void init(GTypeInstance * /* instance */, gpointer /* g_class */)
- {}
-}
+void openvrml_player_file_chooser_dialog_init(
+ OpenvrmlPlayerFileChooserDialog *)
+{}
Modified: branches/0.17/src/openvrml-xembed/gtkvrmlbrowser.cpp
===================================================================
--- branches/0.17/src/openvrml-xembed/gtkvrmlbrowser.cpp 2008-08-03 06:58:14 UTC (rev 3499)
+++ branches/0.17/src/openvrml-xembed/gtkvrmlbrowser.cpp 2008-08-12 10:15:26 UTC (rev 3500)
@@ -34,10 +34,11 @@
using namespace boost::multi_index::detail; // for scope_guard
-extern "C" {
- void gtk_vrml_browser_class_init(GtkVrmlBrowserClass * klass);
- void gtk_vrml_browser_init(GtkVrmlBrowser * vrml_browser);
+G_DEFINE_TYPE(GtkVrmlBrowser,
+ gtk_vrml_browser,
+ GTK_TYPE_VRML_BROWSER)
+extern "C" {
G_GNUC_INTERNAL gboolean gtk_vrml_browser_destroy(GtkWidget * widget,
GdkEvent * event,
gpointer data);
@@ -72,32 +73,6 @@
G_GNUC_INTERNAL gint gtk_vrml_browser_timeout_callback(gpointer ptr);
}
-GType gtk_vrml_browser_get_type()
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (GtkVrmlBrowserClass),
- 0, // base_init
- 0, // base_finalize
- reinterpret_cast<GClassInitFunc>(gtk_vrml_browser_class_init),
- 0, // class_finalize
- 0, // class_data
- sizeof (GtkVrmlBrowser),
- 0, // n_preallocs
- reinterpret_cast<GInstanceInitFunc>(gtk_vrml_browser_init),
- 0 // value_table
- };
-
- type = g_type_register_static(GTK_TYPE_DRAWING_AREA,
- "GtkVrmlBrowser",
- &info,
- GTypeFlags(0));
- }
- return type;
-}
-
namespace {
G_GNUC_INTERNAL GdkGLConfig * gl_config;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-08-12 10:44:18
|
Revision: 3503
http://openvrml.svn.sourceforge.net/openvrml/?rev=3503&view=rev
Author: braden
Date: 2008-08-12 10:44:23 +0000 (Tue, 12 Aug 2008)
Log Message:
-----------
Consistently use size_t when inserting stream handles into IOStreams. ptrdiff_t is signed; so mixing this with size_t can lead to badness.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/mozilla-plugin/src/openvrml.cpp
branches/0.17/src/openvrml-player/player.cpp
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-08-12 10:43:05 UTC (rev 3502)
+++ branches/0.17/ChangeLog 2008-08-12 10:44:23 UTC (rev 3503)
@@ -1,5 +1,29 @@
2008-08-12 Braden McDaniel <br...@en...>
+ Consistently use size_t when inserting stream handles into
+ IOStreams. ptrdiff_t is signed; so mixing this with size_t can
+ lead to badness.
+
+ * src/openvrml-player/player.cpp
+ (openvrml_player_curl_source_callback(gpointer)): Cast the
+ easy_handle to size_t instead of ptrdiff_t before inserting into
+ the command stream.
+ (openvrml_player_curl_write(void *, size_t, size_t, void *)): Cast
+ the easy_handle to size_t instead of ptrdiff_t before inserting
+ into the command stream.
+ * mozilla-plugin/src/openvrml.cpp
+ (NPP_NewStream(NPP, NPMIMEType, NPStream *, NPBool, uint16 *)):
+ Cast the stream handle to size_t instead of ptrdiff_t before
+ inserting into the command stream.
+ (NPP_DestroyStream(NPP, NPStream *, NPError)): Cast the stream
+ handle to size_t instead of ptrdiff_t before inserting into the
+ command stream.
+ (NPP_Write(NPP, NPStream *, int32, int32, void *)): Cast the stream
+ handle to size_t instead of ptrdiff_t before inserting into the
+ command stream.
+
+2008-08-12 Braden McDaniel <br...@en...>
+
Use G_DEFINE_TYPE for custom GTK+ widgets.
* src/openvrml-xembed/gtkvrmlbrowser.cpp
Modified: branches/0.17/mozilla-plugin/src/openvrml.cpp
===================================================================
--- branches/0.17/mozilla-plugin/src/openvrml.cpp 2008-08-12 10:43:05 UTC (rev 3502)
+++ branches/0.17/mozilla-plugin/src/openvrml.cpp 2008-08-12 10:44:23 UTC (rev 3503)
@@ -439,7 +439,7 @@
*static_cast<plugin_instance *>(instance->pdata);
std::ostringstream command;
- command << "new-stream " << ptrdiff_t(stream) << ' ' << type << ' '
+ command << "new-stream " << size_t(stream) << ' ' << type << ' '
<< stream->url << '\n';
const ssize_t bytes_written = pluginInstance.write_command(command.str());
return (bytes_written < 0)
@@ -457,7 +457,7 @@
*static_cast<plugin_instance *>(instance->pdata);
std::ostringstream command;
- command << "destroy-stream " << ptrdiff_t(stream) << '\n';
+ command << "destroy-stream " << size_t(stream) << '\n';
const ssize_t bytes_written = pluginInstance.write_command(command.str());
return (bytes_written < 0)
? NPERR_GENERIC_ERROR
@@ -500,7 +500,7 @@
*static_cast<plugin_instance *>(instance->pdata);
std::ostringstream command;
- command << "write " << ptrdiff_t(stream) << ' ' << ' ' << len << '\n';
+ command << "write " << size_t(stream) << ' ' << ' ' << len << '\n';
for (int32 i = 0; i < len; ++i) {
command.put(static_cast<char *>(buffer)[i]);
}
Modified: branches/0.17/src/openvrml-player/player.cpp
===================================================================
--- branches/0.17/src/openvrml-player/player.cpp 2008-08-12 10:43:05 UTC (rev 3502)
+++ branches/0.17/src/openvrml-player/player.cpp 2008-08-12 10:44:23 UTC (rev 3503)
@@ -668,7 +668,7 @@
//
if (entry->second.initialized()) {
std::ostringstream command;
- command << "destroy-stream " << ptrdiff_t(msg->easy_handle)
+ command << "destroy-stream " << size_t(msg->easy_handle)
<< '\n';
const ssize_t bytes_written = ::write_command(command.str());
g_return_val_if_fail(
@@ -881,7 +881,7 @@
std::ostringstream new_stream_command;
new_stream_command
- << "new-stream " << ptrdiff_t(stream_data.handle()) << ' '
+ << "new-stream " << size_t(stream_data.handle()) << ' '
<< (type ? type : "application/octet-stream") << ' '
<< stream_data.url() << '\n';
::write_command(new_stream_command.str());
@@ -889,7 +889,7 @@
}
std::ostringstream write_command;
- write_command << "write " << ptrdiff_t(stream_data.handle()) << ' '
+ write_command << "write " << size_t(stream_data.handle()) << ' '
<< size * nmemb << '\n';
const char * data = static_cast<char *>(ptr);
for (; data != static_cast<char *>(ptr) + size * nmemb;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-08-12 16:15:23
|
Revision: 3504
http://openvrml.svn.sourceforge.net/openvrml/?rev=3504&view=rev
Author: braden
Date: 2008-08-12 16:15:25 +0000 (Tue, 12 Aug 2008)
Log Message:
-----------
Updates for 0.17.7 release.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/NEWS
branches/0.17/README
branches/0.17/configure.ac
branches/0.17/doc/Doxyfile
branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.rc
branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj
branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc
branches/0.17/mozilla-plugin/configure.ac
branches/0.17/src/Makefile.am
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-08-12 10:44:23 UTC (rev 3503)
+++ branches/0.17/ChangeLog 2008-08-12 16:15:25 UTC (rev 3504)
@@ -1,5 +1,20 @@
2008-08-12 Braden McDaniel <br...@en...>
+ Updates for 0.17.7 release.
+
+ * NEWS
+ * README
+ * configure.ac
+ * doc/Doxyfile
+ * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.rc
+ * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj
+ * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc
+ * mozilla-plugin/configure.ac
+ * src/Makefile.am: Updated libopenvrml libtool library version to
+ 8:6:0; updated libopenvrml-gl libtool library version to 7:2:0.
+
+2008-08-12 Braden McDaniel <br...@en...>
+
Consistently use size_t when inserting stream handles into
IOStreams. ptrdiff_t is signed; so mixing this with size_t can
lead to badness.
Modified: branches/0.17/NEWS
===================================================================
--- branches/0.17/NEWS 2008-08-12 10:44:23 UTC (rev 3503)
+++ branches/0.17/NEWS 2008-08-12 16:15:25 UTC (rev 3504)
@@ -1,3 +1,13 @@
+Changes new in version 0.17.7, 12 August, 2008
+========================================================================
+
+- Fixed potential crashes when processing coordinate, color, and
+ normal indices.
+
+- Fixed potential failure in the Mozilla plug-in and openvrml-player
+ due to inconsistent handling of stream handles.
+
+
Changes new in version 0.17.6, 17 June, 2008
========================================================================
Modified: branches/0.17/README
===================================================================
--- branches/0.17/README 2008-08-12 10:44:23 UTC (rev 3503)
+++ branches/0.17/README 2008-08-12 16:15:25 UTC (rev 3504)
@@ -1,4 +1,4 @@
-OpenVRML library version 0.17.6
+OpenVRML library version 0.17.7
Copyright 1998, 1999, 2000 Chris Morley <cm...@ve...>
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Braden McDaniel <br...@en...>
Modified: branches/0.17/configure.ac
===================================================================
--- branches/0.17/configure.ac 2008-08-12 10:44:23 UTC (rev 3503)
+++ branches/0.17/configure.ac 2008-08-12 16:15:25 UTC (rev 3504)
@@ -1,4 +1,4 @@
-AC_INIT([OpenVRML], [0.17.6], [ope...@li...])
+AC_INIT([OpenVRML], [0.17.7], [ope...@li...])
AC_PREREQ([2.53])
AC_COPYRIGHT([Portions copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Braden McDaniel])
AC_CONFIG_FILES([Makefile]
Modified: branches/0.17/doc/Doxyfile
===================================================================
--- branches/0.17/doc/Doxyfile 2008-08-12 10:44:23 UTC (rev 3503)
+++ branches/0.17/doc/Doxyfile 2008-08-12 16:15:25 UTC (rev 3504)
@@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = OpenVRML
-PROJECT_NUMBER = 0.17.6
+PROJECT_NUMBER = 0.17.7
OUTPUT_DIRECTORY =
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
Modified: branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.rc
===================================================================
--- branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.rc 2008-08-12 10:44:23 UTC (rev 3503)
+++ branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.rc 2008-08-12 16:15:25 UTC (rev 3504)
@@ -11,8 +11,8 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 8,5,0,0
- PRODUCTVERSION 0,17,6,0
+ FILEVERSION 8,6,0,0
+ PRODUCTVERSION 0,17,7,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -28,12 +28,12 @@
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "OpenVRML Library"
- VALUE "FileVersion", "8, 5, 0, 0"
+ VALUE "FileVersion", "8, 6, 0, 0"
VALUE "InternalName", "openvrml"
VALUE "LegalCopyright", "Copyright (C) 2008"
VALUE "OriginalFilename", "openvrml.dll"
VALUE "ProductName", "OpenVRML Library"
- VALUE "ProductVersion", "0.17.6"
+ VALUE "ProductVersion", "0.17.7"
END
END
BLOCK "VarFileInfo"
Modified: branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj
===================================================================
--- branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj 2008-08-12 10:44:23 UTC (rev 3503)
+++ branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj 2008-08-12 16:15:25 UTC (rev 3504)
@@ -42,7 +42,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".;..\..\..\..\..\src\libopenvrml"
- PreprocessorDefinitions="NOMINMAX;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;BOOST_SPIRIT_THREADSAFE;BOOST_SPIRIT_CLOSURE_LIMIT=6;PHOENIX_LIMIT=6;PACKAGE_VERSION=\"0.17.6\";BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS;BOOST_MPL_LIMIT_VECTOR_SIZE=30;OPENVRML_BUILD_DLL;OPENVRML_ENABLE_PNG_TEXTURES;OPENVRML_ENABLE_RENDER_TEXT_NODE;OPENVRML_FT_CONST="const""
+ PreprocessorDefinitions="NOMINMAX;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;BOOST_SPIRIT_THREADSAFE;BOOST_SPIRIT_CLOSURE_LIMIT=6;PHOENIX_LIMIT=6;PACKAGE_VERSION=\"0.17.7\";BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS;BOOST_MPL_LIMIT_VECTOR_SIZE=30;OPENVRML_BUILD_DLL;OPENVRML_ENABLE_PNG_TEXTURES;OPENVRML_ENABLE_RENDER_TEXT_NODE;OPENVRML_FT_CONST="const""
MinimalRebuild="false"
BasicRuntimeChecks="0"
RuntimeLibrary="3"
@@ -127,7 +127,7 @@
InlineFunctionExpansion="1"
OmitFramePointers="true"
AdditionalIncludeDirectories=".;..\..\..\..\..\src\libopenvrml"
- PreprocessorDefinitions="NOMINMAX;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;BOOST_SPIRIT_THREADSAFE;PACKAGE_VERSION=\"0.17.6\";BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS;BOOST_MPL_LIMIT_VECTOR_SIZE=30;BOOST_SPIRIT_CLOSURE_LIMIT=6;PHOENIX_LIMIT=6;OPENVRML_BUILD_DLL;OPENVRML_ENABLE_PNG_TEXTURES;OPENVRML_ENABLE_RENDER_TEXT_NODE;OPENVRML_FT_CONST="const";NDEBUG"
+ PreprocessorDefinitions="NOMINMAX;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;BOOST_SPIRIT_THREADSAFE;PACKAGE_VERSION=\"0.17.7\";BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS;BOOST_MPL_LIMIT_VECTOR_SIZE=30;BOOST_SPIRIT_CLOSURE_LIMIT=6;PHOENIX_LIMIT=6;OPENVRML_BUILD_DLL;OPENVRML_ENABLE_PNG_TEXTURES;OPENVRML_ENABLE_RENDER_TEXT_NODE;OPENVRML_FT_CONST="const";NDEBUG"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
Modified: branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc
===================================================================
--- branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc 2008-08-12 10:44:23 UTC (rev 3503)
+++ branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc 2008-08-12 16:15:25 UTC (rev 3504)
@@ -11,8 +11,8 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 7,1,0,0
- PRODUCTVERSION 0,17,6,0
+ FILEVERSION 7,2,0,0
+ PRODUCTVERSION 0,17,7,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -28,12 +28,12 @@
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "OpenVRML OpenGL Renderer Library"
- VALUE "FileVersion", "7, 1, 0, 0"
+ VALUE "FileVersion", "7, 2, 0, 0"
VALUE "InternalName", "openvrml-gl"
VALUE "LegalCopyright", "Copyright (C) 2008"
VALUE "OriginalFilename", "openvrml-gl.dll"
VALUE "ProductName", "OpenVRML Library"
- VALUE "ProductVersion", "0.17.6"
+ VALUE "ProductVersion", "0.17.7"
END
END
BLOCK "VarFileInfo"
Modified: branches/0.17/mozilla-plugin/configure.ac
===================================================================
--- branches/0.17/mozilla-plugin/configure.ac 2008-08-12 10:44:23 UTC (rev 3503)
+++ branches/0.17/mozilla-plugin/configure.ac 2008-08-12 16:15:25 UTC (rev 3504)
@@ -1,5 +1,5 @@
AC_PREREQ([2.53])
-AC_INIT([OpenVRML Mozilla Plugin], [0.17.6],
+AC_INIT([OpenVRML Mozilla Plugin], [0.17.7],
[ope...@li...])
AC_COPYRIGHT([Portions copyright 2004, 2005, 2006, 2007, 2008 Braden McDaniel])
AC_CONFIG_FILES([Makefile]
Modified: branches/0.17/src/Makefile.am
===================================================================
--- branches/0.17/src/Makefile.am 2008-08-12 10:44:23 UTC (rev 3503)
+++ branches/0.17/src/Makefile.am 2008-08-12 16:15:25 UTC (rev 3504)
@@ -72,8 +72,8 @@
openvrml-xembed/gtkvrmlbrowser.h \
openvrml-player/filechooserdialog.h
-LIBOPENVRML_LIBRARY_VERSION = 8:5:0
-LIBOPENVRML_GL_LIBRARY_VERSION = 7:1:0
+LIBOPENVRML_LIBRARY_VERSION = 8:6:0
+LIBOPENVRML_GL_LIBRARY_VERSION = 7:2:0
# | | |
# +------+ | +---+
# | | |
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-08-13 14:33:09
|
Revision: 3507
http://openvrml.svn.sourceforge.net/openvrml/?rev=3507&view=rev
Author: braden
Date: 2008-08-13 14:33:17 +0000 (Wed, 13 Aug 2008)
Log Message:
-----------
Fixed invocation of G_DEFINE_TYPE to point at the parent type.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/src/openvrml-xembed/gtkvrmlbrowser.cpp
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-08-12 22:08:09 UTC (rev 3506)
+++ branches/0.17/ChangeLog 2008-08-13 14:33:17 UTC (rev 3507)
@@ -1,3 +1,8 @@
+2008-08-13 Braden McDaniel <br...@en...>
+
+ * src/openvrml-xembed/gtkvrmlbrowser.cpp: Fixed invocation of
+ G_DEFINE_TYPE to point at the parent type.
+
2008-08-12 Braden McDaniel <br...@en...>
Updates for 0.17.7 release.
Modified: branches/0.17/src/openvrml-xembed/gtkvrmlbrowser.cpp
===================================================================
--- branches/0.17/src/openvrml-xembed/gtkvrmlbrowser.cpp 2008-08-12 22:08:09 UTC (rev 3506)
+++ branches/0.17/src/openvrml-xembed/gtkvrmlbrowser.cpp 2008-08-13 14:33:17 UTC (rev 3507)
@@ -36,7 +36,7 @@
G_DEFINE_TYPE(GtkVrmlBrowser,
gtk_vrml_browser,
- GTK_TYPE_VRML_BROWSER)
+ GTK_TYPE_DRAWING_AREA)
extern "C" {
G_GNUC_INTERNAL gboolean gtk_vrml_browser_destroy(GtkWidget * widget,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-08-13 14:42:15
|
Revision: 3508
http://openvrml.svn.sourceforge.net/openvrml/?rev=3508&view=rev
Author: braden
Date: 2008-08-13 14:42:21 +0000 (Wed, 13 Aug 2008)
Log Message:
-----------
Updated "About" dialog license text to reflect GPLv3 licensing.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/src/openvrml-player/player.cpp
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-08-13 14:33:17 UTC (rev 3507)
+++ branches/0.17/ChangeLog 2008-08-13 14:42:21 UTC (rev 3508)
@@ -1,5 +1,10 @@
2008-08-13 Braden McDaniel <br...@en...>
+ * src/openvrml-player/player.cpp: Updated "About" dialog license
+ text to reflect GPLv3 licensing.
+
+2008-08-13 Braden McDaniel <br...@en...>
+
* src/openvrml-xembed/gtkvrmlbrowser.cpp: Fixed invocation of
G_DEFINE_TYPE to point at the parent type.
Modified: branches/0.17/src/openvrml-player/player.cpp
===================================================================
--- branches/0.17/src/openvrml-player/player.cpp 2008-08-13 14:33:17 UTC (rev 3507)
+++ branches/0.17/src/openvrml-player/player.cpp 2008-08-13 14:42:21 UTC (rev 3508)
@@ -1,6 +1,6 @@
// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 78 -*-
//
-// Copyright 2006, 2007 Braden McDaniel
+// Copyright 2006, 2007, 2008 Braden McDaniel
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
@@ -914,7 +914,7 @@
const gchar license[] =
"This program is free software; you can redistribute it and/or modify "
"it under the terms of the GNU General Public License as published by "
- "the Free Software Foundation; either version 2 of the License, or "
+ "the Free Software Foundation; either version 3 of the License, or "
"(at your option) any later version.\n\n"
"This program is distributed in the hope that it will be useful, but "
@@ -923,9 +923,7 @@
"General Public License for more details.\n\n"
"You should have received a copy of the GNU General Public License "
- "along with this program; if not, write to the Free Software "
- "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 "
- "USA";
+ "along with this program; if not, see <http://www.gnu.org/licenses/>.";
gtk_show_about_dialog(parent,
"name", app_name,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-08-13 14:47:14
|
Revision: 3509
http://openvrml.svn.sourceforge.net/openvrml/?rev=3509&view=rev
Author: braden
Date: 2008-08-13 14:47:19 +0000 (Wed, 13 Aug 2008)
Log Message:
-----------
Updates for 0.17.8 release.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/NEWS
branches/0.17/README
branches/0.17/configure.ac
branches/0.17/doc/Doxyfile
branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.rc
branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj
branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc
branches/0.17/mozilla-plugin/configure.ac
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-08-13 14:42:21 UTC (rev 3508)
+++ branches/0.17/ChangeLog 2008-08-13 14:47:19 UTC (rev 3509)
@@ -1,5 +1,18 @@
2008-08-13 Braden McDaniel <br...@en...>
+ Updates for 0.17.8 release.
+
+ * NEWS
+ * README
+ * configure.ac
+ * doc/Doxyfile
+ * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.rc
+ * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj
+ * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc
+ * mozilla-plugin/configure.ac
+
+2008-08-13 Braden McDaniel <br...@en...>
+
* src/openvrml-player/player.cpp: Updated "About" dialog license
text to reflect GPLv3 licensing.
Modified: branches/0.17/NEWS
===================================================================
--- branches/0.17/NEWS 2008-08-13 14:42:21 UTC (rev 3508)
+++ branches/0.17/NEWS 2008-08-13 14:47:19 UTC (rev 3509)
@@ -1,3 +1,9 @@
+Changes new in version 0.17.8, 13 August, 2008
+========================================================================
+
+- Fixed an initialization problem in openvrml-xembed.
+
+
Changes new in version 0.17.7, 12 August, 2008
========================================================================
Modified: branches/0.17/README
===================================================================
--- branches/0.17/README 2008-08-13 14:42:21 UTC (rev 3508)
+++ branches/0.17/README 2008-08-13 14:47:19 UTC (rev 3509)
@@ -1,4 +1,4 @@
-OpenVRML library version 0.17.7
+OpenVRML library version 0.17.8
Copyright 1998, 1999, 2000 Chris Morley <cm...@ve...>
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Braden McDaniel <br...@en...>
Modified: branches/0.17/configure.ac
===================================================================
--- branches/0.17/configure.ac 2008-08-13 14:42:21 UTC (rev 3508)
+++ branches/0.17/configure.ac 2008-08-13 14:47:19 UTC (rev 3509)
@@ -1,4 +1,4 @@
-AC_INIT([OpenVRML], [0.17.7], [ope...@li...])
+AC_INIT([OpenVRML], [0.17.8], [ope...@li...])
AC_PREREQ([2.53])
AC_COPYRIGHT([Portions copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Braden McDaniel])
AC_CONFIG_FILES([Makefile]
Modified: branches/0.17/doc/Doxyfile
===================================================================
--- branches/0.17/doc/Doxyfile 2008-08-13 14:42:21 UTC (rev 3508)
+++ branches/0.17/doc/Doxyfile 2008-08-13 14:47:19 UTC (rev 3509)
@@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = OpenVRML
-PROJECT_NUMBER = 0.17.7
+PROJECT_NUMBER = 0.17.8
OUTPUT_DIRECTORY =
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
Modified: branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.rc
===================================================================
--- branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.rc 2008-08-13 14:42:21 UTC (rev 3508)
+++ branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.rc 2008-08-13 14:47:19 UTC (rev 3509)
@@ -12,7 +12,7 @@
VS_VERSION_INFO VERSIONINFO
FILEVERSION 8,6,0,0
- PRODUCTVERSION 0,17,7,0
+ PRODUCTVERSION 0,17,8,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -33,7 +33,7 @@
VALUE "LegalCopyright", "Copyright (C) 2008"
VALUE "OriginalFilename", "openvrml.dll"
VALUE "ProductName", "OpenVRML Library"
- VALUE "ProductVersion", "0.17.7"
+ VALUE "ProductVersion", "0.17.8"
END
END
BLOCK "VarFileInfo"
Modified: branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj
===================================================================
--- branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj 2008-08-13 14:42:21 UTC (rev 3508)
+++ branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj 2008-08-13 14:47:19 UTC (rev 3509)
@@ -42,7 +42,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".;..\..\..\..\..\src\libopenvrml"
- PreprocessorDefinitions="NOMINMAX;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;BOOST_SPIRIT_THREADSAFE;BOOST_SPIRIT_CLOSURE_LIMIT=6;PHOENIX_LIMIT=6;PACKAGE_VERSION=\"0.17.7\";BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS;BOOST_MPL_LIMIT_VECTOR_SIZE=30;OPENVRML_BUILD_DLL;OPENVRML_ENABLE_PNG_TEXTURES;OPENVRML_ENABLE_RENDER_TEXT_NODE;OPENVRML_FT_CONST="const""
+ PreprocessorDefinitions="NOMINMAX;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;BOOST_SPIRIT_THREADSAFE;BOOST_SPIRIT_CLOSURE_LIMIT=6;PHOENIX_LIMIT=6;PACKAGE_VERSION=\"0.17.8\";BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS;BOOST_MPL_LIMIT_VECTOR_SIZE=30;OPENVRML_BUILD_DLL;OPENVRML_ENABLE_PNG_TEXTURES;OPENVRML_ENABLE_RENDER_TEXT_NODE;OPENVRML_FT_CONST="const""
MinimalRebuild="false"
BasicRuntimeChecks="0"
RuntimeLibrary="3"
@@ -127,7 +127,7 @@
InlineFunctionExpansion="1"
OmitFramePointers="true"
AdditionalIncludeDirectories=".;..\..\..\..\..\src\libopenvrml"
- PreprocessorDefinitions="NOMINMAX;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;BOOST_SPIRIT_THREADSAFE;PACKAGE_VERSION=\"0.17.7\";BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS;BOOST_MPL_LIMIT_VECTOR_SIZE=30;BOOST_SPIRIT_CLOSURE_LIMIT=6;PHOENIX_LIMIT=6;OPENVRML_BUILD_DLL;OPENVRML_ENABLE_PNG_TEXTURES;OPENVRML_ENABLE_RENDER_TEXT_NODE;OPENVRML_FT_CONST="const";NDEBUG"
+ PreprocessorDefinitions="NOMINMAX;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;BOOST_SPIRIT_THREADSAFE;PACKAGE_VERSION=\"0.17.8\";BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS;BOOST_MPL_LIMIT_VECTOR_SIZE=30;BOOST_SPIRIT_CLOSURE_LIMIT=6;PHOENIX_LIMIT=6;OPENVRML_BUILD_DLL;OPENVRML_ENABLE_PNG_TEXTURES;OPENVRML_ENABLE_RENDER_TEXT_NODE;OPENVRML_FT_CONST="const";NDEBUG"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
Modified: branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc
===================================================================
--- branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc 2008-08-13 14:42:21 UTC (rev 3508)
+++ branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc 2008-08-13 14:47:19 UTC (rev 3509)
@@ -12,7 +12,7 @@
VS_VERSION_INFO VERSIONINFO
FILEVERSION 7,2,0,0
- PRODUCTVERSION 0,17,7,0
+ PRODUCTVERSION 0,17,8,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -33,7 +33,7 @@
VALUE "LegalCopyright", "Copyright (C) 2008"
VALUE "OriginalFilename", "openvrml-gl.dll"
VALUE "ProductName", "OpenVRML Library"
- VALUE "ProductVersion", "0.17.7"
+ VALUE "ProductVersion", "0.17.8"
END
END
BLOCK "VarFileInfo"
Modified: branches/0.17/mozilla-plugin/configure.ac
===================================================================
--- branches/0.17/mozilla-plugin/configure.ac 2008-08-13 14:42:21 UTC (rev 3508)
+++ branches/0.17/mozilla-plugin/configure.ac 2008-08-13 14:47:19 UTC (rev 3509)
@@ -1,5 +1,5 @@
AC_PREREQ([2.53])
-AC_INIT([OpenVRML Mozilla Plugin], [0.17.7],
+AC_INIT([OpenVRML Mozilla Plugin], [0.17.8],
[ope...@li...])
AC_COPYRIGHT([Portions copyright 2004, 2005, 2006, 2007, 2008 Braden McDaniel])
AC_CONFIG_FILES([Makefile]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-08-15 20:29:46
|
Revision: 3515
http://openvrml.svn.sourceforge.net/openvrml/?rev=3515&view=rev
Author: braden
Date: 2008-08-15 20:29:54 +0000 (Fri, 15 Aug 2008)
Log Message:
-----------
Symbols with internal linkage don't need visibility attributes.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/src/libopenvrml/openvrml/node.cpp
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-08-15 20:22:47 UTC (rev 3514)
+++ branches/0.17/ChangeLog 2008-08-15 20:29:54 UTC (rev 3515)
@@ -1,3 +1,8 @@
+2008-08-15 Braden McDaniel <br...@en...>
+
+ * src/libopenvrml/openvrml/node.cpp: Symbols with internal linkage
+ don't need visibility attributes.
+
2008-08-13 Braden McDaniel <br...@en...>
Updates for 0.17.8 release.
Modified: branches/0.17/src/libopenvrml/openvrml/node.cpp
===================================================================
--- branches/0.17/src/libopenvrml/openvrml/node.cpp 2008-08-15 20:22:47 UTC (rev 3514)
+++ branches/0.17/src/libopenvrml/openvrml/node.cpp 2008-08-15 20:29:54 UTC (rev 3515)
@@ -146,7 +146,6 @@
typedef boost::array<const char *, 5> node_interface_type_id;
- OPENVRML_LOCAL
const node_interface_type_id vrml97_node_interface_type_id_ = {
"<invalid interface type>",
"eventIn",
@@ -155,7 +154,6 @@
"field"
};
- OPENVRML_LOCAL
const node_interface_type_id x3d_node_interface_type_id_ = {
"<invalid interface type>",
"inputOnly",
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-08-15 22:51:50
|
Revision: 3517
http://openvrml.svn.sourceforge.net/openvrml/?rev=3517&view=rev
Author: braden
Date: 2008-08-15 22:51:59 +0000 (Fri, 15 Aug 2008)
Log Message:
-----------
Improved doc-comment.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/src/libopenvrml/openvrml/browser.cpp
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-08-15 22:48:45 UTC (rev 3516)
+++ branches/0.17/ChangeLog 2008-08-15 22:51:59 UTC (rev 3517)
@@ -1,5 +1,11 @@
2008-08-15 Braden McDaniel <br...@en...>
+ * src/libopenvrml/openvrml/browser.cpp
+ (openvrml::browser::load_url(const std::vector<std::string> &,
+ const std::vector<std::string> &)): Improved doc-comment.
+
+2008-08-15 Braden McDaniel <br...@en...>
+
* src/libopenvrml/openvrml/node.cpp: Symbols with internal linkage
don't need visibility attributes.
Modified: branches/0.17/src/libopenvrml/openvrml/browser.cpp
===================================================================
--- branches/0.17/src/libopenvrml/openvrml/browser.cpp 2008-08-15 22:48:45 UTC (rev 3516)
+++ branches/0.17/src/libopenvrml/openvrml/browser.cpp 2008-08-15 22:51:59 UTC (rev 3517)
@@ -7996,13 +7996,21 @@
};
/**
- * @brief Load a VRML world into the browser.
+ * @brief Asynchronously load a VRML world into the @c browser.
*
+ * This function takes an alternative URI list consistent with such lists as
+ * they appear in VRML nodes. @c openvrml::browser_event::initialized will be
+ * emitted once the world has been loaded and initialized.
+ *
+ * For synchronously loading a world, see @c #set_world.
+ *
* @param[in] url a URI.
* @param[in] parameter parameters for @p url.
*
* @exception std::bad_alloc if memory allocation fails.
* @exception boost::thread_resource_error if thread creation fails.
+ *
+ * @sa #set_world
*/
void openvrml::browser::load_url(const std::vector<std::string> & url,
const std::vector<std::string> &)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-08-21 07:49:32
|
Revision: 3519
http://openvrml.svn.sourceforge.net/openvrml/?rev=3519&view=rev
Author: braden
Date: 2008-08-21 07:49:40 +0000 (Thu, 21 Aug 2008)
Log Message:
-----------
Quell some warnings from gcc about comparing signed and unsigned types.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/src/libopenvrml-gl/openvrml/gl/viewer.cpp
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-08-21 07:47:56 UTC (rev 3518)
+++ branches/0.17/ChangeLog 2008-08-21 07:49:40 UTC (rev 3519)
@@ -1,3 +1,14 @@
+2008-08-21 Braden McDaniel <br...@en...>
+
+ * src/libopenvrml-gl/openvrml/gl/viewer.cpp
+ (openvrml::gl::viewer::do_insert_shell(unsigned int, const
+ std::vector<vec3f> & coord, const std::vector<int32> &
+ coord_index, const std::vector<color> & color, const
+ std::vector<int32> & color_index, const std::vector<vec3f> &
+ normal, const std::vector<int32> & normal_index, const
+ std::vector<vec2f> & tex_coord, const std::vector<int32> &
+ tex_coord_index)): Quell some warnings from gcc.
+
2008-08-15 Braden McDaniel <br...@en...>
* src/libopenvrml/openvrml/browser.cpp
Modified: branches/0.17/src/libopenvrml-gl/openvrml/gl/viewer.cpp
===================================================================
--- branches/0.17/src/libopenvrml-gl/openvrml/gl/viewer.cpp 2008-08-21 07:47:56 UTC (rev 3518)
+++ branches/0.17/src/libopenvrml-gl/openvrml/gl/viewer.cpp 2008-08-21 07:49:40 UTC (rev 3519)
@@ -3072,7 +3072,7 @@
i < color_index.size();
++i) {
if (color_index[i] < 0) { continue; }
- if (!(coord_index[i] < coord.size())) { continue; }
+ if (!(size_t(coord_index[i]) < coord.size())) { continue; }
vertices[coord_index[i]].color = &color[color_index[i]];
}
}
@@ -3089,7 +3089,7 @@
i < normal_index.size();
++i) {
if (normal_index[i] < 0) { continue; }
- if (!(coord_index[i] < coord.size())) { continue; }
+ if (!(size_t(coord_index[i]) < coord.size())) { continue; }
vertices[coord_index[i]].normal = &normal[normal_index[i]];
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-08-31 21:01:35
|
Revision: 3558
http://openvrml.svn.sourceforge.net/openvrml/?rev=3558&view=rev
Author: braden
Date: 2008-08-31 21:01:36 +0000 (Sun, 31 Aug 2008)
Log Message:
-----------
Culled redundant includes.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/src/libopenvrml/openvrml/browser.h
branches/0.17/src/libopenvrml/openvrml/field_value.h
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-08-31 07:34:53 UTC (rev 3557)
+++ branches/0.17/ChangeLog 2008-08-31 21:01:36 UTC (rev 3558)
@@ -1,3 +1,12 @@
+2008-08-31 Braden McDaniel <br...@en...>
+
+ Culled redundant includes.
+
+ * src/libopenvrml/openvrml/browser.h: Don't need to include
+ read_write_mutex.h here.
+ * src/libopenvrml/openvrml/script.h: Don't need to include
+ boost/thread/mutex.hpp here.
+
2008-08-21 Braden McDaniel <br...@en...>
* src/libopenvrml-gl/openvrml/gl/viewer.cpp
Modified: branches/0.17/src/libopenvrml/openvrml/browser.h
===================================================================
--- branches/0.17/src/libopenvrml/openvrml/browser.h 2008-08-31 07:34:53 UTC (rev 3557)
+++ branches/0.17/src/libopenvrml/openvrml/browser.h 2008-08-31 21:01:36 UTC (rev 3558)
@@ -23,7 +23,6 @@
# define OPENVRML_BROWSER_H
# include <boost/thread.hpp>
-# include <openvrml/read_write_mutex.h>
# include <openvrml/script.h>
namespace openvrml {
Modified: branches/0.17/src/libopenvrml/openvrml/field_value.h
===================================================================
--- branches/0.17/src/libopenvrml/openvrml/field_value.h 2008-08-31 07:34:53 UTC (rev 3557)
+++ branches/0.17/src/libopenvrml/openvrml/field_value.h 2008-08-31 21:01:36 UTC (rev 3558)
@@ -30,7 +30,6 @@
# include <boost/intrusive_ptr.hpp>
# include <boost/shared_ptr.hpp>
# include <boost/utility.hpp>
-# include <boost/thread/mutex.hpp>
# include <openvrml/basetypes.h>
# include <openvrml/read_write_mutex.h>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-09-06 05:01:42
|
Revision: 3584
http://openvrml.svn.sourceforge.net/openvrml/?rev=3584&view=rev
Author: braden
Date: 2008-09-06 05:01:52 +0000 (Sat, 06 Sep 2008)
Log Message:
-----------
Use GtkBuilder in openvrml-player instead of libglade. Note that this changes the environment variable used to locate the UI definition from OPENVRML_PLAYER_GLADEDIR to OPENVRML_PLAYER_UIDIR.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/configure.ac
branches/0.17/src/Makefile.am
branches/0.17/src/openvrml-player/filechooserdialog.cpp
branches/0.17/src/openvrml-player/filechooserdialog.h
branches/0.17/src/openvrml-player/player.cpp
Added Paths:
-----------
branches/0.17/src/openvrml-player/openvrml-player.ui
Removed Paths:
-------------
branches/0.17/src/openvrml-player/openvrml-player.glade
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-09-06 04:10:46 UTC (rev 3583)
+++ branches/0.17/ChangeLog 2008-09-06 05:01:52 UTC (rev 3584)
@@ -1,3 +1,56 @@
+2008-09-06 Braden McDaniel <br...@en...>
+
+ Use GtkBuilder in openvrml-player instead of libglade. Note that
+ this changes the environment variable used to locate the UI
+ definition from OPENVRML_PLAYER_GLADEDIR to OPENVRML_PLAYER_UIDIR.
+
+ * configure.ac: Removed check for libglade; require gtk+-2.0 >=
+ 2.12.
+ * src/Makefile.am
+ (openvrml_player_openvrml_player_CXXFLAGS): Removed GLADE_CFLAGS.
+ (openvrml_player_openvrml_player_LDFLAGS): Removed GLADE_LIBS.
+ (openvrml_player_gladedir): Removed; replaced with
+ openvrml_player_uidir.
+ (openvrml_player_glade_DATA): Removed; replaced with
+ openvrml_player_ui_DATA.
+ (openvrml_player_uidir): Added.
+ (openvrml_player_ui_DATA): Added.
+ (EXTRA_DIST): Distribute openvrml_player_ui_DATA files.
+ * src/openvrml-player/filechooserdialog.cpp
+ (openvrml_player_file_chooser_dialog_get_type()): Removed; use
+ definition provided by G_DEFINE_TYPE instead.
+ (openvrml_player_file_chooser_dialog_new(GtkWindow *)): Removed;
+ logic moved to constructor.
+ (constructor(GType, guint, GObjectConstructParam *)): Moved dialog
+ setup logic here.
+ (class_init(gpointer, gpointer)): Moved to
+ openvrml_player_file_chooser_dialog_class_init (because
+ G_DEFINE_TYPE wants the long name).
+ (init(GTypeInstance *, gpointer)): Moved to
+ openvrml_player_file_chooser_dialog_init (because G_DEFINE_TYPE
+ wants the long name).
+ (openvrml_player_file_chooser_dialog_class_init(OpenvrmlPlayerFileChooserDialogClass *)):
+ Specify the constructor function.
+ (openvrml_player_file_chooser_dialog_init(OpenvrmlPlayerFileChooserDialog *)):
+ Added.
+ * src/openvrml-player/filechooserdialog.h
+ (openvrml_player_file_chooser_dialog_new(GtkWindow *)): Removed.
+ * src/openvrml-player/openvrml-player.glade: Removed.
+ * src/openvrml-player/openvrml-player.ui: Added.
+ * src/openvrml-player/player.cpp
+ (main(int, char *[])): Removed calls to glade_init and
+ glade_register_widget; create a GtkBuilder instead of GladeXML;
+ call gtk_builder_connect_signals instead of
+ glade_xml_signal_autoconnect; call gtk_builder_get_object instead
+ of glade_xml_get_widget.
+ (xml_new(GnomeProgram &)): Removed; replaced with builder_new.
+ (builder_new(GnomeProgram &, GError **)): Create a GtkBuilder from
+ openvrml-player.ui. Use the environment variable
+ OPENVRML_PLAYER_UIDIR to locate this file if it is not in a known
+ location.
+ (openvrml_player_build_file_chooser_dialog(GladeXML *, GType,
+ GladeWidgetInfo *)): Removed.
+
2008-08-31 Braden McDaniel <br...@en...>
Culled redundant includes.
Modified: branches/0.17/configure.ac
===================================================================
--- branches/0.17/configure.ac 2008-09-06 04:10:46 UTC (rev 3583)
+++ branches/0.17/configure.ac 2008-09-06 05:01:52 UTC (rev 3584)
@@ -140,9 +140,10 @@
# openvrml-xembed and openvrml-player both use GOption, which was
# introduced in GLib 2.6.
#
-PKG_CHECK_MODULES([GTK], [gtk+-2.0 gthread-2.0 glib-2.0 >= 2.6], ,
+# openvrml-player uses GtkBuilder, which was introduced in GTK+ 2.12.
+#
+PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.12 gthread-2.0 glib-2.0 >= 2.6], ,
[have_gtk=no])
-PKG_CHECK_MODULES([GLADE], [libglade-2.0], , [have_libglade=no])
#
# openvrml-player uses GNOME_PARAM_GOPTION_CONTEXT, which was
# introduced in libgnome 2.14.
Modified: branches/0.17/src/Makefile.am
===================================================================
--- branches/0.17/src/Makefile.am 2008-09-06 04:10:46 UTC (rev 3583)
+++ branches/0.17/src/Makefile.am 2008-09-06 05:01:52 UTC (rev 3584)
@@ -205,16 +205,14 @@
-I$(srcdir)/libopenvrml
openvrml_player_openvrml_player_CXXFLAGS = \
$(GNOMEUI_CFLAGS) \
- $(GLADE_CFLAGS) \
$(CURL_CFLAGS)
openvrml_player_openvrml_player_LDFLAGS = \
-export-dynamic \
$(GNOMEUI_LIBS) \
- $(GLADE_LIBS) \
$(CURL_LIBS)
-openvrml_player_gladedir = $(datadir)/openvrml-player/glade
-openvrml_player_glade_DATA = openvrml-player/openvrml-player.glade
+openvrml_player_uidir = $(datadir)/openvrml-player/ui
+openvrml_player_ui_DATA = openvrml-player/openvrml-player.ui
openvrml_player_openvrml_player_SOURCES = \
openvrml-player/filechooserdialog.cpp \
@@ -224,7 +222,7 @@
EXTRA_DIST = \
libopenvrml/openvrml-config.h.in \
libopenvrml-gl/openvrml-gl-config.h.in \
- $(openvrml_player_glade_DATA)
+ $(openvrml_player_ui_DATA)
#
# Automake 1.10 seems to need this for distcheck to work.
Modified: branches/0.17/src/openvrml-player/filechooserdialog.cpp
===================================================================
--- branches/0.17/src/openvrml-player/filechooserdialog.cpp 2008-09-06 04:10:46 UTC (rev 3583)
+++ branches/0.17/src/openvrml-player/filechooserdialog.cpp 2008-09-06 05:01:52 UTC (rev 3584)
@@ -27,61 +27,79 @@
openvrml_player_file_chooser_dialog,
GTK_TYPE_FILE_CHOOSER_DIALOG)
-GtkWidget * openvrml_player_file_chooser_dialog_new(GtkWindow * parent)
-{
- GtkWidget * const dialog =
- static_cast<GtkWidget *>(
- g_object_new(OPENVRML_PLAYER_TYPE_FILE_CHOOSER_DIALOG,
- "title", "Open",
- "action", GTK_FILE_CHOOSER_ACTION_OPEN,
- NULL));
- scope_guard dialog_guard = make_guard(g_object_unref, dialog);
- boost::ignore_unused_variable_warning(dialog_guard);
+namespace {
- if (parent) {
- gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
- }
+ G_GNUC_INTERNAL GObject *
+ constructor(GType type,
+ guint n_construct_properties,
+ GObjectConstructParam * construct_properties)
+ {
+ GObject * obj;
+ {
+ // Invoke parent constructor.
+ OpenvrmlPlayerFileChooserDialogClass * klass =
+ OPENVRML_PLAYER_FILE_CHOOSER_DIALOG_CLASS(
+ g_type_class_peek(
+ OPENVRML_PLAYER_TYPE_FILE_CHOOSER_DIALOG));
+ GObjectClass * parent_class =
+ G_OBJECT_CLASS(g_type_class_peek_parent(klass));
+ obj = parent_class->constructor(type,
+ n_construct_properties,
+ construct_properties);
+ }
- gtk_dialog_add_buttons(GTK_DIALOG(dialog),
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
- NULL);
+ GValue title = {};
+ g_value_init(&title, G_TYPE_STRING);
+ g_value_set_string(&title, "Open");
+ g_object_set_property(obj, "title", &title);
+ GValue action = {};
+ g_value_init(&action, G_TYPE_UINT);
+ g_value_set_uint(&action, GTK_FILE_CHOOSER_ACTION_OPEN);
+ g_object_set_property(obj, "action", &action);
- gtk_dialog_set_default_response(GTK_DIALOG(dialog),
- GTK_RESPONSE_ACCEPT);
+ gtk_dialog_add_buttons(GTK_DIALOG(obj),
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+ NULL);
- GtkFileFilter * const world_filter = gtk_file_filter_new();
- g_return_val_if_fail(world_filter, 0);
- scope_guard world_filter_guard = make_guard(g_object_unref, world_filter);
- boost::ignore_unused_variable_warning(world_filter_guard);
- gtk_file_filter_set_name(world_filter, "VRML/X3D worlds");
- gtk_file_filter_add_mime_type(world_filter, "x-world/x-vrml");
- gtk_file_filter_add_mime_type(world_filter, "model/vrml");
- gtk_file_filter_add_mime_type(world_filter, "model/x3d+vrml");
+ gtk_dialog_set_default_response(GTK_DIALOG(obj),
+ GTK_RESPONSE_ACCEPT);
- gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), world_filter);
- world_filter_guard.dismiss();
+ GtkFileFilter * const world_filter = gtk_file_filter_new();
+ g_return_val_if_fail(world_filter, 0);
+ scope_guard world_filter_guard = make_guard(g_object_unref,
+ world_filter);
+ boost::ignore_unused_variable_warning(world_filter_guard);
+ gtk_file_filter_set_name(world_filter, "VRML/X3D worlds");
+ gtk_file_filter_add_mime_type(world_filter, "x-world/x-vrml");
+ gtk_file_filter_add_mime_type(world_filter, "model/vrml");
+ gtk_file_filter_add_mime_type(world_filter, "model/x3d+vrml");
- GtkFileFilter * const all_filter = gtk_file_filter_new();
- g_return_val_if_fail(all_filter, 0);
- scope_guard all_filter_guard = make_guard(g_object_unref, all_filter);
- boost::ignore_unused_variable_warning(all_filter_guard);
- gtk_file_filter_set_name(all_filter, "All files");
- gtk_file_filter_add_pattern(all_filter, "*");
+ gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(obj), world_filter);
+ world_filter_guard.dismiss();
- gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), all_filter);
- all_filter_guard.dismiss();
+ GtkFileFilter * const all_filter = gtk_file_filter_new();
+ g_return_val_if_fail(all_filter, 0);
+ scope_guard all_filter_guard = make_guard(g_object_unref, all_filter);
+ boost::ignore_unused_variable_warning(all_filter_guard);
+ gtk_file_filter_set_name(all_filter, "All files");
+ gtk_file_filter_add_pattern(all_filter, "*");
- dialog_guard.dismiss();
+ gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(obj), all_filter);
+ all_filter_guard.dismiss();
- return dialog;
+ return obj;
+ }
}
void
openvrml_player_file_chooser_dialog_class_init(
- OpenvrmlPlayerFileChooserDialogClass *)
-{}
+ OpenvrmlPlayerFileChooserDialogClass * const klass)
+{
+ G_OBJECT_CLASS(klass)->constructor = constructor;
+}
-void openvrml_player_file_chooser_dialog_init(
- OpenvrmlPlayerFileChooserDialog *)
+void
+openvrml_player_file_chooser_dialog_init(
+ OpenvrmlPlayerFileChooserDialog * dialog)
{}
Modified: branches/0.17/src/openvrml-player/filechooserdialog.h
===================================================================
--- branches/0.17/src/openvrml-player/filechooserdialog.h 2008-09-06 04:10:46 UTC (rev 3583)
+++ branches/0.17/src/openvrml-player/filechooserdialog.h 2008-09-06 05:01:52 UTC (rev 3584)
@@ -43,7 +43,6 @@
};
GType openvrml_player_file_chooser_dialog_get_type() G_GNUC_CONST;
-GtkWidget * openvrml_player_file_chooser_dialog_new(GtkWindow * parent);
G_END_DECLS
Deleted: branches/0.17/src/openvrml-player/openvrml-player.glade
===================================================================
--- branches/0.17/src/openvrml-player/openvrml-player.glade 2008-09-06 04:10:46 UTC (rev 3583)
+++ branches/0.17/src/openvrml-player/openvrml-player.glade 2008-09-06 05:01:52 UTC (rev 3584)
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<glade-interface>
- <widget class="GtkWindow" id="window">
- <property name="default-width">640</property>
- <property name="default-height">480</property>
- <signal name="delete-event" handler="openvrml_player_quit"/>
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <child>
- <widget class="GtkMenuBar" id="menubar1">
- <property name="visible">True</property>
- <child>
- <widget class="GtkMenuItem" id="menuitem1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_File</property>
- <property name="use_underline">True</property>
- <child>
- <widget class="GtkMenu" id="menu1">
- <property name="visible">True</property>
- <child>
- <widget class="GtkImageMenuItem" id="imagemenuitemopen">
- <property name="visible">True</property>
- <property name="label" translatable="yes">gtk-open</property>
- <property name="use_underline">True</property>
- <property name="use_stock">True</property>
- <signal name="activate" handler="openvrml_player_on_file_open_activated" object="filechooserdialog"/>
- </widget>
- </child>
- <child>
- <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
- <property name="visible">True</property>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="imagemenuitem5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">gtk-quit</property>
- <property name="use_underline">True</property>
- <property name="use_stock">True</property>
- <signal name="activate" handler="openvrml_player_quit"/>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkMenuItem" id="menuitem4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Help</property>
- <property name="use_underline">True</property>
- <child>
- <widget class="GtkMenu" id="menu3">
- <property name="visible">True</property>
- <child>
- <widget class="GtkImageMenuItem" id="imagemenuitem10">
- <property name="visible">True</property>
- <property name="label" translatable="yes">gtk-about</property>
- <property name="use_underline">True</property>
- <property name="use_stock">True</property>
- <signal name="activate" handler="openvrml_player_on_about_activated" object="window"/>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <child>
- <widget class="GtkEntry" id="locationentry">
- <property name="visible">True</property>
- <signal name="activate" handler="openvrml_player_on_locationentry_activated"/>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkSocket" id="socket">
- <property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="has-focus">True</property>
- </widget>
- </child>
- <child>
- <widget class="GtkStatusbar" id="statusbar1">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <widget class="OpenvrmlPlayerFileChooserDialog" id="filechooserdialog">
- </widget>
-</glade-interface>
Copied: branches/0.17/src/openvrml-player/openvrml-player.ui (from rev 3495, trunk/src/openvrml-player/openvrml-player.ui)
===================================================================
--- branches/0.17/src/openvrml-player/openvrml-player.ui (rev 0)
+++ branches/0.17/src/openvrml-player/openvrml-player.ui 2008-09-06 05:01:52 UTC (rev 3584)
@@ -0,0 +1,105 @@
+<?xml version="1.0"?>
+<interface>
+ <object class="GtkUIManager" id="uimanager1">
+ <child>
+ <object class="GtkActionGroup" id="actiongroup1">
+ <child>
+ <object class="GtkAction" id="menuitem1">
+ <property name="name">menuitem1</property>
+ <property name="label" translatable="yes">_File</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="imagemenuitemopen">
+ <property name="stock_id" translatable="yes">gtk-open</property>
+ <property name="name">imagemenuitemopen</property>
+ <signal handler="openvrml_player_on_file_open_activated" name="activate" object="filechooserdialog"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="imagemenuitem5">
+ <property name="stock_id" translatable="yes">gtk-quit</property>
+ <property name="name">imagemenuitem5</property>
+ <signal handler="openvrml_player_quit" name="activate"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="menuitem4">
+ <property name="name">menuitem4</property>
+ <property name="label" translatable="yes">_Help</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="imagemenuitem10">
+ <property name="stock_id" translatable="yes">gtk-about</property>
+ <property name="name">imagemenuitem10</property>
+ <signal handler="openvrml_player_on_about_activated" name="activate" object="window"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <ui>
+ <menubar name="menubar1">
+ <menu action="menuitem1">
+ <menuitem action="imagemenuitemopen"/>
+ <separator/>
+ <menuitem action="imagemenuitem5"/>
+ </menu>
+ <menu action="menuitem4">
+ <menuitem action="imagemenuitem10"/>
+ </menu>
+ </menubar>
+ </ui>
+ </object>
+ <object class="GtkWindow" id="window">
+ <property name="default-width">640</property>
+ <property name="default-height">480</property>
+ <signal handler="openvrml_player_quit" name="delete-event"/>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkMenuBar" constructor="uimanager1" id="menubar1">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkEntry" id="locationentry">
+ <property name="visible">True</property>
+ <signal handler="openvrml_player_on_locationentry_activated" name="activate"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSocket" id="socket">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="has-focus">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkStatusbar" id="statusbar1">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <object class="OpenvrmlPlayerFileChooserDialog" id="filechooserdialog">
+ </object>
+</interface>
Modified: branches/0.17/src/openvrml-player/player.cpp
===================================================================
--- branches/0.17/src/openvrml-player/player.cpp 2008-09-06 04:10:46 UTC (rev 3583)
+++ branches/0.17/src/openvrml-player/player.cpp 2008-09-06 05:01:52 UTC (rev 3584)
@@ -29,8 +29,7 @@
# include <curl/curl.h>
# include <libgnomevfs/gnome-vfs.h>
# include <libgnomeui/libgnomeui.h>
-# include <glade/glade.h>
-# include <glade/glade-build.h>
+# include <gtk/gtkbuilder.h>
# include <openvrml/browser.h>
# include "filechooserdialog.h"
@@ -43,7 +42,7 @@
extern "C" {
//
- // GTK+ signal handlers; libglade needs them to have external linkage in
+ // GTK+ signal handlers; GtkBuilder needs them to have external linkage in
// order to connect them.
//
OPENVRML_API void openvrml_player_on_about_activated(GtkWindow * window);
@@ -82,11 +81,6 @@
G_GNUC_INTERNAL void openvrml_player_watch_child(GPid pid,
gint status,
gpointer data);
- G_GNUC_INTERNAL
- GtkWidget *
- openvrml_player_build_file_chooser_dialog(GladeXML * xml,
- GType widget_type,
- GladeWidgetInfo * info);
}
namespace {
@@ -103,7 +97,8 @@
gint & out_fd);
G_GNUC_INTERNAL ssize_t write_command(const std::string & command);
G_GNUC_INTERNAL GSource * curl_source_new(CURLM * multi_handle);
- G_GNUC_INTERNAL GladeXML * xml_new(GnomeProgram & program);
+ G_GNUC_INTERNAL GtkBuilder * builder_new(GnomeProgram & program,
+ GError ** error);
G_GNUC_INTERNAL void set_locationentry_text(const gchar * text);
G_GNUC_INTERNAL void load_url(const gchar * url);
@@ -214,29 +209,32 @@
GNOME_PARAM_APP_DATADIR, OPENVRML_PLAYER_PKGDATADIR_,
GNOME_PARAM_NONE);
- glade_init();
- glade_register_widget(OPENVRML_PLAYER_TYPE_FILE_CHOOSER_DIALOG,
- openvrml_player_build_file_chooser_dialog,
- 0,
- 0);
+ GError * error = 0;
+ scope_guard error_guard = make_guard(g_error_free, ref(error));
+ GtkBuilder * const builder = builder_new(*program, &error);
+ if (!builder) {
+ g_critical("Failed to create UI builder: %s", error->message);
+ return EXIT_FAILURE;
+ }
+ gtk_builder_connect_signals(builder, 0);
- GladeXML * const xml = xml_new(*program);
- glade_xml_signal_autoconnect(xml);
-
- GtkWidget * const app_window = glade_xml_get_widget(xml, "window");
+ GtkWidget * const app_window =
+ GTK_WIDGET(gtk_builder_get_object(builder, "window"));
GtkWidget * const file_chooser_dialog =
- glade_xml_get_widget(xml, "filechooserdialog");
+ GTK_WIDGET(gtk_builder_get_object(builder, "filechooserdialog"));
gtk_window_set_transient_for(GTK_WINDOW(file_chooser_dialog),
GTK_WINDOW(app_window));
- ::location_entry = glade_xml_get_widget(xml, "locationentry");
+ ::location_entry =
+ GTK_WIDGET(gtk_builder_get_object(builder, "locationentry"));
g_signal_connect(file_chooser_dialog,
"response",
G_CALLBACK(openvrml_player_on_filechooserdialog_response),
location_entry);
gint standard_input, standard_output;
- GtkWidget * const socket = glade_xml_get_widget(xml, "socket");
+ GtkWidget * const socket =
+ GTK_WIDGET(gtk_builder_get_object(builder, "socket"));
const GPid child_pid =
spawn_openvrml_xembed(gtk_socket_get_id(GTK_SOCKET(socket)),
standard_input,
@@ -246,8 +244,6 @@
::command_channel = g_io_channel_unix_new(standard_input);
if (!::command_channel) { throw std::bad_alloc(); }
- GError * error = 0;
- scope_guard error_guard = make_guard(g_error_free, ref(error));
GIOStatus status = g_io_channel_set_encoding(::command_channel,
0, // binary (no encoding)
&error);
@@ -413,31 +409,36 @@
return child_pid;
}
- GladeXML * xml_new(GnomeProgram & program)
+ GtkBuilder * builder_new(GnomeProgram & program, GError ** error)
{
using std::string;
- const gchar * const gladedir = g_getenv("OPENVRML_PLAYER_GLADEDIR");
- string glade_file_str;
- const gchar * glade_file = 0;
- if (gladedir) {
- glade_file_str = string(gladedir) + "/openvrml-player.glade";
- glade_file = glade_file_str.c_str();
+ const gchar * const uidir = g_getenv("OPENVRML_PLAYER_UIDIR");
+ string ui_file_str;
+ const gchar * ui_file = 0;
+ if (uidir) {
+ ui_file_str = string(uidir) + "/openvrml-player.ui";
+ ui_file = ui_file_str.c_str();
}
- if (!glade_file) {
+ if (!ui_file) {
static const gboolean only_if_exists = true;
- glade_file =
+ ui_file =
gnome_program_locate_file(&program,
GNOME_FILE_DOMAIN_APP_DATADIR,
- "/glade/openvrml-player.glade",
+ "/ui/openvrml-player.ui",
only_if_exists,
0);
}
- g_return_val_if_fail(glade_file, 0);
+ g_return_val_if_fail(ui_file, 0);
- return glade_xml_new(glade_file, 0, 0);
+ GtkBuilder * builder = gtk_builder_new();
+ if (!gtk_builder_add_from_file(builder, ui_file, error)) {
+ return 0;
+ }
+
+ return builder;
}
void set_locationentry_text(const gchar * const text)
@@ -1018,15 +1019,6 @@
gtk_main_quit();
}
-GtkWidget *
-openvrml_player_build_file_chooser_dialog(GladeXML * /* xml */,
- GType /* widget_type */,
- GladeWidgetInfo * /* info */)
-{
- GtkWidget * widget = openvrml_player_file_chooser_dialog_new(0);
- return widget;
-}
-
namespace {
ssize_t write_command(const std::string & command)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-09-06 05:06:29
|
Revision: 3585
http://openvrml.svn.sourceforge.net/openvrml/?rev=3585&view=rev
Author: braden
Date: 2008-09-06 05:06:40 +0000 (Sat, 06 Sep 2008)
Log Message:
-----------
Use dist_ prefix instead of EXTRA_DIST for openvrml_player_ui_DATA.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/src/Makefile.am
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-09-06 05:01:52 UTC (rev 3584)
+++ branches/0.17/ChangeLog 2008-09-06 05:06:40 UTC (rev 3585)
@@ -1,5 +1,11 @@
2008-09-06 Braden McDaniel <br...@en...>
+ * src/Makefile.am
+ (dist_openvrml_player_ui_DATA): Applied dist_ prefix.
+ (EXTRA_DIST): Removed openvrml_player_ui_DATA.
+
+2008-09-06 Braden McDaniel <br...@en...>
+
Use GtkBuilder in openvrml-player instead of libglade. Note that
this changes the environment variable used to locate the UI
definition from OPENVRML_PLAYER_GLADEDIR to OPENVRML_PLAYER_UIDIR.
Modified: branches/0.17/src/Makefile.am
===================================================================
--- branches/0.17/src/Makefile.am 2008-09-06 05:01:52 UTC (rev 3584)
+++ branches/0.17/src/Makefile.am 2008-09-06 05:06:40 UTC (rev 3585)
@@ -212,7 +212,7 @@
$(CURL_LIBS)
openvrml_player_uidir = $(datadir)/openvrml-player/ui
-openvrml_player_ui_DATA = openvrml-player/openvrml-player.ui
+dist_openvrml_player_ui_DATA = openvrml-player/openvrml-player.ui
openvrml_player_openvrml_player_SOURCES = \
openvrml-player/filechooserdialog.cpp \
@@ -221,8 +221,7 @@
EXTRA_DIST = \
libopenvrml/openvrml-config.h.in \
- libopenvrml-gl/openvrml-gl-config.h.in \
- $(openvrml_player_ui_DATA)
+ libopenvrml-gl/openvrml-gl-config.h.in
#
# Automake 1.10 seems to need this for distcheck to work.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-09-06 05:40:59
|
Revision: 3586
http://openvrml.svn.sourceforge.net/openvrml/?rev=3586&view=rev
Author: braden
Date: 2008-09-06 05:41:07 +0000 (Sat, 06 Sep 2008)
Log Message:
-----------
Use D-Bus for communication between openvrml-xembed and its hosts, openvrml-player and the Mozilla plug-in.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/README
branches/0.17/configure.ac
branches/0.17/lib/gtkglext/gdk/x11/gdkglcontext-x11.c
branches/0.17/mozilla-plugin/configure.ac
branches/0.17/mozilla-plugin/src/Makefile.am
branches/0.17/mozilla-plugin/src/openvrml.cpp
branches/0.17/src/Makefile.am
branches/0.17/src/openvrml-player/filechooserdialog.cpp
branches/0.17/src/openvrml-player/openvrml-player.ui
branches/0.17/src/openvrml-player/player.cpp
branches/0.17/src/openvrml-xembed/main.cpp
branches/0.17/src/openvrml-xembed/plugin_streambuf.cpp
branches/0.17/src/openvrml-xembed/plugin_streambuf.h
Added Paths:
-----------
branches/0.17/src/openvrml-player/curlbrowserhost.cpp
branches/0.17/src/openvrml-player/curlbrowserhost.h
branches/0.17/src/openvrml-xembed/browser-factory.xml
branches/0.17/src/openvrml-xembed/browser-host.xml
branches/0.17/src/openvrml-xembed/browser.cpp
branches/0.17/src/openvrml-xembed/browser.h
branches/0.17/src/openvrml-xembed/browser.xml
branches/0.17/src/openvrml-xembed/browserfactory.cpp
branches/0.17/src/openvrml-xembed/browserfactory.h
branches/0.17/src/openvrml-xembed/org.openvrml.BrowserControl.service.in
branches/0.17/src/openvrml-xembed/streamclient.cpp
branches/0.17/src/openvrml-xembed/streamclient.h
Removed Paths:
-------------
branches/0.17/src/openvrml-xembed/command_istream.cpp
branches/0.17/src/openvrml-xembed/command_istream.h
branches/0.17/src/openvrml-xembed/gtkvrmlbrowser.cpp
branches/0.17/src/openvrml-xembed/gtkvrmlbrowser.h
branches/0.17/src/openvrml-xembed/request_channel.h
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-09-06 05:06:40 UTC (rev 3585)
+++ branches/0.17/ChangeLog 2008-09-06 05:41:07 UTC (rev 3586)
@@ -1,6 +1,256 @@
2008-09-06 Braden McDaniel <br...@en...>
+ Use D-Bus for communication between openvrml-xembed and its hosts,
+ openvrml-player and the Mozilla plug-in.
+
+ * README: Note changed openvrml-xembed usage.
+ * configure.ac: Check for D-Bus; emit the BrowserControl service
+ descriptor.
+ * lib/gtkglext/gdk/x11/gdkglcontext-x11.c
+ (_gdk_gl_context_destroy): Fixed usage of
+ g_object_remove_weak_pointer.
+ (_gdk_gl_context_set_gl_drawable): Fixed usage of
+ g_object_{add,remove}_weak_pointer.
+ * mozilla-plugin/configure.ac: Check for D-Bus; remove check for
+ GTK+.
+ * mozilla-plugin/src/Makefile.am
+ (AM_CXXFLAGS): Added DBUS_G_CFLAGS.
+ (BUILT_SOURCES): Build browser-host-server-glue.h.
+ (openvrml_la_LDFLAGS): Added DBUS_G_LIBS.
+ * mozilla-plugin/src/openvrml.cpp
+ (OpenvrmlNpBrowserHost): GObject implementing the
+ org.openvrml.BrowserHost D-Bus interface.
+ (OpenvrmlNpBrowserHostClass): Class object for
+ OpenvrmlNpBrowserHost.
+ (openvrml_np_browser_host_get_type()): GType object for
+ OpenvrmlNpBrowserHost.
+ (plugin_instance): Use void* for window rather than
+ GdkNativeWindow; no reason for this type to be the plug-in code's
+ only GTK+ dependency. Removed members command_channel,
+ request_channel, request_channel_watch_id, and request_line.
+ Added browser_host--the org.openvrml.BrowserHost--and browser--the
+ proxy for the org.openvrml.Browser object. Removed write_command
+ member funtion; added member functions new_stream, destroy_stream,
+ and write. The latter are delegated to by NPP_NewStream,
+ NPP_DestroyStream, and NPP_Write, respectively.
+ (openvrml_np_browser_host_init(OpenvrmlNpBrowserHost *)): Instance
+ init function for the OpenvrmlNpBrowserHost GObject.
+ (openvrml_np_browser_host_class_init(OpenvrmlNpBrowserHostClass *)):
+ Class init function for the OpenvrmlNpBrowserHost GObject.
+ (openvrml_np_browser_host_get_url(OpenvrmlNpBrowserHost *, const
+ char *, GError **)): Implementation of
+ org.openvrml.BrowserHost.GetUrl. We can delegate directly to
+ NPN_GetURL.
+ (openvrml_np_browser_host_set_world_url(OpenvrmlNpBrowserHost *,
+ const char * url, GError **)): Implementation of
+ org.openvrml.BrowserHost.SetWorldUrl. For now, at least, we don't
+ need this to do anything.
+ (NPP_GetMIMDescription()): Use an explicit const_cast to quell the
+ gcc warning about using a string literal as a (nonconst) char*.
+ (NPP_NewStream(NPP, NPMIMEType, NPStream *, NPBool, uint16 *)):
+ Delegate to plugin_instance::new_stream.
+ (NPP_DestroyStream(NPP, NPStream *, NPError)): Delegate to
+ plugin_instance::destroy_stream.
+ (NPP_Write(NPP, NPStream *, int32, int32, void *)): Delegate to
+ plugin_instance::write.
+ (plugin_instance::plugin_instance(NPP)): Initialize the
+ browser_host; set its npp member.
+ (plugin_instance::~plugin_instance()): Emit the Shutdown signal.
+ (get_browser(DBusGConnection *, const char *, const char *,
+ guint64, GError **)): Get the org.openvrml.Browser proxy.
+ (plugin_instance::set_window(NPWindow &)): Get the plug via D-Bus;
+ we don't need (explicitly) to start up the openvrml-xembed process
+ here anymore.
+ (plugin_instance::new_stream(NPMIMEType, NPStream *)): Make a
+ blocking call to org.openvrml.Browser.NewStream.
+ (plugin_instance::destroy_stream(NPStream *)): Make a nonblocking
+ call to org.openvrml.Browser.DestroyStream.
+ (plugin_instance::write(NPStream *, int32, void *)): Make a
+ nonblocking call to org.openvrml.Browser.Write.
+ (plugin_instance::write_command(const std::string &)): Removed.
+ (request_data_available(GIOChannel *, GIOCondition, gpointer)):
+ Removed.
* src/Makefile.am
+ (session_bus_services_DATA): Install the
+ org.openvrml.BrowserControl service descriptor.
+ (noinst_HEADERS): Removed obsolete
+ openvrml-xembed/command_istream.h,
+ openvrml-xembed/request_channel.h, and
+ openvrml-xembed/gtkvrmlbrowser.h.
+ (openvrml_xembed_openvrml_xembed_CPPFLAGS): Look in the
+ openvrml-xembed builddir for headers (specifically, the ones
+ generated by dbus-binding-tool).
+ (openvrml_xembed_datadir): (Sub)package-specific data directory.
+ (openvrml_xembed_dbusdir): We'll install the D-Bus interface XML
+ here for lack of a better idea.
+ (dist_openvrml_xembed_dbus_DATA): D-Bus interface XML.
+ (BUILT_SOURCES): Build the introspection data headers with
+ dbus-binding-tool.
+ * src/openvrml-xembed/org.openvrml.BrowserControl.service.in
+ (openvrml_player_openvrml_player_CPPFLAGS): Look in the
+ openvrml-player builddir for headers (specifically, the ones
+ generated by dbus-binding-tool).
+ (openvrml_player_openvrml_player_CXXFLAGS): Added DBUS_G_CFLAGS.
+ (openvrml_player_openvrml_player_LDFLAGS): Added DBUS_G_LIBS.
+ (openvrml_player_openvrml_player_SOURCES): Added
+ openvrml-player/curlbrowserhost.{cpp,h}.
+ (EXTRA_DIST): Added
+ openvrml-xembed/org.openvrml.BrowserControl.service.in (configure
+ input).
+ (CLEANFILES): Added BUILT_SOURCES.
+ (DISTCLEANFILES): Clean up configure-generated files.
+ * src/openvrml-xembed/browser.cpp: Added file.
+ OpenvrmlXembedBrowser implementation (evolved from the now-defunct
+ GtkVrmlBrowser).
+ * src/openvrml-xembed/browser.h: Added file.
+ OpenvrmlXembedBrowser implements the org.openvrml.Browser D-Bus
+ interface.
+ * src/openvrml-xembed/browser.xml: Added
+ file. org.openvrml.Browser D-Bus interface definition.
+ * src/openvrml-xembed/browserfactory.cpp: Added file.
+ OpenvrmlXembedBrowserFactory implementation.
+ * src/openvrml-xembed/browserfactory.h: Added file.
+ OpenvrmlXembedBrowserFactory implements the
+ org.openvrml.BrowserFactory D-Bus interface.
+ * src/openvrml-xembed/browser-factory.xml: Added file.
+ org.openvrml.BrowserFactory D-Bus interface definition.
+ * src/openvrml-xembed/browser-host.xml: Added file.
+ org.openvrml.BrowserHost D-Bus interface definition.
+ * src/openvrml-xembed/command_istream.cpp: Removed.
+ * src/openvrml-xembed/command_istream.h: Removed.
+ * src/openvrml-xembed/gtkvrmlbrowser.cpp: Removed.
+ * src/openvrml-xembed/gtkvrmlbrowser.h: Removed.
+ * src/openvrml-xembed/plugin_streambuf.cpp
+ (openvrml_xembed::plugin_streambuf::plugin_streambuf(const
+ std::string &, uninitialized_plugin_streambuf_map &,
+ plugin_streambuf_map &)): Maintain references to the
+ uninitialized_plugin_streambuf_map and the plugin_streambuf_map.
+ Now that these maps are per-OpenvrmlXembedBrowser instance, we
+ cannot access them as globals.
+ (openvrml_xembed::plugin_streambuf::state() const): Get the
+ current state of the streambuf (i.e., requested, uninitialized, or
+ initialized).
+ (openvrml_xembed::plugin_streambuf::set_get_url_result(int)):
+ Since we no longer have the requested_plugin_streambuf_map, set
+ the state to uninitialized on success; or simply remove the stream
+ from the uninitialized_map_ on failure.
+ (openvrml_xembed::plugin_streambuf::fail()): Use the member
+ uninitialized_map_.
+ (openvrml_xembed::requested_plugin_streambuf_map::find(const
+ std::string &) const): Removed.
+ (openvrml_xembed::requested_plugin_streambuf_map::insert(const
+ std::string &, const boost::shared_ptr<plugin_streambuf> &)):
+ Removed.
+ (openvrml_xembed::requested_plugin_streambuf_map::map_entry_matches_streambuf):
+ Removed.
+ (openvrml_xembed::requested_plugin_streambuf_map::erase(const
+ plugin_streambuf &)): Removed.
+ (openvrml_xembed::requested_plugin_streambuf_map_): Removed.
+ (openvrml_xembed::uninitialized_plugin_streambuf_map_): Removed.
+ (openvrml_xembed::plugin_streambuf_map_): Removed.
+ * src/openvrml-xembed/plugin_streambuf.h
+ (openvrml_xembed::plugin_streambuf): Added state_id enum along
+ with state_ member and the corresponding state() accessor. Added
+ reference members for the uninitialized_plugin_streambuf_map and
+ the plugin_streambuf_map.
+ (openvrml_xembed::requested_plugin_streambuf_map): Removed.
+ * src/openvrml-xembed/main.cpp
+ (initial_stream_uri): Moved to browser.cpp.
+ (openvrml_xembed::request_channel): Removed.
+ (openvrml_xembed::request_channel_mutex): Removed.
+ (openvrml_xembed::event_listener_id_map): Removed.
+ (openvrml_xembed::command_istream_reader): Removed.
+ (openvrml_xembed::initial_stream_reader): Moved to browser.cpp.
+ (openvrml_xembed::command_channel_loop): Removed.
+ (main(int, char *[])): Removed --initial-stream option and the XID
+ argument. Rather than setting up GIOChannels, create the
+ BrowserFactory.
+ (openvrml_xembed_browser_event_func(GtkVrmlBrowser *,
+ GtkVrmlBrowserEvent, gpointer)): Removed.
+ (command_channel_shutdown(GIOChannel *)): Removed.
+ (request_channel_shutdown(GIOChannel *)): Removed.
+ * src/openvrml-xembed/request_channel.h: Removed.
+ * src/openvrml-xembed/streamclient.cpp: Added;
+ OpenvrmlXembedStreamClient interface definition.
+ * src/openvrml-xembed/streamclient.h: Added; a gobject interface
+ that a host can stream to.
+ * src/openvrml-player/openvrml-player.ui: Don't specify an object
+ target for the openvrml_player_on_file_open_activated signal
+ handler. Create a child OpenvrmlPlayerCurlBrowserHost instead of
+ a GtkSocket.
+ * src/openvrml-player/curlbrowserhost.cpp: Added.
+ OpenvrmlPlayerCurlBrowserHost implementation.
+ * src/openvrml-player/curlbrowserhost.h: Added.
+ OpenvrmlPlayerCurlBrowserHost inherits GtkSocket and implements
+ the org.openvrml.BrowserHost D-Bus interface.
+ * src/openvrml-player/player.cpp
+ (command_channel): Removed.
+ (request_channel): Removed.
+ (request_channel_watch_id): Removed.
+ (signal_data): Added. Data for GUI (GtkBuilder) signal handlers.
+ (curl_stream_data): Moved to curlbrowserhost.cpp.
+ (curl_source_callback_data): Removed.
+ (request_data): Removed.
+ (location_entry): Removed.
+ (OPENVRML_PLAYER_CURL_EASY_RETURN_VAL_IF_ERROR): Moved to
+ curlbrowserhost.cpp.
+ (OPENVRML_PLAYER_CURL_MULTI_RETURN_IF_ERROR): Moved to
+ curlbrowserhost.cpp.
+ (OPENVRML_PLAYER_CURL_MULTI_RETURN_VAL_IF_ERROR): Moved to
+ curlbrowserhost.cpp.
+ (main(int, char *[])): Got rid of all the command/request channel
+ setup stuff. The browser control is now created by the
+ OpenvrmlPlayerCurlControlHost. All we have to do in main is set
+ up the GUI. Note that since the control isn't created until
+ realize, we defer calling _load_url until then.
+ (get_openvrml_xembed_cmd(gint &, char **&)): Removed.
+ (spawn_openvrml_xembed(GtkNativeWindow, gint &, gint &)): Removed.
+ (set_locationentry_text(const gchar *)): Removed.
+ (load_url(const gchar *)): Removed.
+ (CURLSource): Moved to curlbrowserhost.cpp.
+ (curl_source_new(CURLM *)): Moved to curlbrowserhost.cpp.
+ (reset_fds(CURLSource &)): Moved to curlbrowserhost.cpp.
+ (openvrml_player_curl_prepare(GSource *, gint *)): Moved to
+ curlbrowserhost.cpp as
+ openvrml_player_curl_browser_host_curl_prepare.
+ (openvrml_player_curl_check(GSource *)): Moved to
+ curlbrowserhost.cpp as
+ openvrml_player_curl_browser_host_curl_check.
+ (openvrml_player_curl_dispatch(GSource *, GSourceFunc, gpointer)):
+ Moved to curlbrowserhost.cpp as
+ openvrml_player_curl_browser_host_curl_dispatch.
+ (openvrml_player_curl_finalize(GSource *)): Moved to
+ curlbrowserhost.cpp as
+ openvrml_player_curl_browser_host_curl_finalize.
+ (openvrml_player_curl_source_callback(gpointer)): Moved to
+ curlbrowserhost.cpp as
+ openvrml_player_curl_browser_host_curl_source_callback.
+ (openvrml_player_request_data_available(GIOChannel *,
+ GIOCondition, gpointer)): Removed.
+ (openvrml_player_curl_write(void *, size_t, size_t, void *)):
+ Moved to curlbrowserhost.cpp as
+ openvrml_player_curl_browser_host_curl_write.
+ (openvrml_player_on_file_open_activated(GtkAction *, gpointer)):
+ Use signal_data passed in the user_data argument.
+ (openvrml_player_on_locationentry_activated(GtkEntry *,
+ gpointer)): Use signal_data passed in the user_data argument.
+ (openvrml_player_quit): No more quit dance; just call
+ gtk_main_quit.
+ (openvrml_player_watch_child(GPid, gint, gpointer)): Removed.
+ (openvrml_player_on_browserhost_realize(GtkWidget *, gpointer)):
+ Load the URL passed in user_data; see main.
+ (write_command(const std::string &)): Removed.
+ (curl_stream_data(CURL *, const char *)): Moved to
+ curlbrowserhost.cpp.
+ (curl_stream_data::handle() const): Moved to curlbrowserhost.cpp.
+ (curl_stream_data::url() const): Moved to curlbrowserhost.cpp.
+ (curl_stream_data::initialize()): Moved to curlbrowserhost.cpp.
+ (curl_stream_data::initialized() const): Moved to
+ curlbrowserhost.cpp.
+
+2008-09-06 Braden McDaniel <br...@en...>
+
+ * src/Makefile.am
(dist_openvrml_player_ui_DATA): Applied dist_ prefix.
(EXTRA_DIST): Removed openvrml_player_ui_DATA.
Modified: branches/0.17/README
===================================================================
--- branches/0.17/README 2008-09-06 05:06:40 UTC (rev 3585)
+++ branches/0.17/README 2008-09-06 05:41:07 UTC (rev 3586)
@@ -280,11 +280,12 @@
Mozilla-based browser will show a listing of successfully installed
plug-ins.
- It is possible, for testing or other convenience, to run the
-plug-in from the build directories. A symbolic link to the plug-in
-module "openvrml.so" must be made in the Mozilla plug-in directory and
-the environment variable "OPENVRML_XEMBED" must be set to the full
-path name of the "openvrml-xembed" executable.
+ To run openvrml-player or the Mozilla plug-in from the build
+directories, you must first start an openvrml-xembed process. Once
+openvrml-xembed has been installed, D-Bus will start it automatically
+as needed. Additionally, to run the plug-in from the build
+directories, a symbolic link to the plug-in module "openvrml.so" must
+be made in the Mozilla plug-in directory.
Conformance
Modified: branches/0.17/configure.ac
===================================================================
--- branches/0.17/configure.ac 2008-09-06 05:06:40 UTC (rev 3585)
+++ branches/0.17/configure.ac 2008-09-06 05:41:07 UTC (rev 3586)
@@ -13,6 +13,7 @@
[java/vrml/node/Makefile]
[java/vrml/field/Makefile]
[src/Makefile]
+ [src/openvrml-xembed/org.openvrml.BrowserControl.service]
[src/libopenvrml/openvrml-config.h]
[src/libopenvrml-gl/openvrml-gl-config.h]
[examples/Makefile]
@@ -140,6 +141,13 @@
# openvrml-xembed and openvrml-player both use GOption, which was
# introduced in GLib 2.6.
#
+PKG_CHECK_MODULES([DBUS_G], [dbus-glib-1 glib-2.0 >= 2.6], ,
+ [have_dbus_glib=no])
+AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool])
+session_bus_servicesdir=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
+AC_SUBST([session_bus_servicesdir])
+
+#
# openvrml-player uses GtkBuilder, which was introduced in GTK+ 2.12.
#
PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.12 gthread-2.0 glib-2.0 >= 2.6], ,
Modified: branches/0.17/lib/gtkglext/gdk/x11/gdkglcontext-x11.c
===================================================================
--- branches/0.17/lib/gtkglext/gdk/x11/gdkglcontext-x11.c 2008-09-06 05:06:40 UTC (rev 3585)
+++ branches/0.17/lib/gtkglext/gdk/x11/gdkglcontext-x11.c 2008-09-06 05:41:07 UTC (rev 3586)
@@ -107,9 +107,8 @@
if (impl->gldrawable != NULL)
{
- gpointer gldrawable_location = impl->gldrawable;
g_object_remove_weak_pointer (G_OBJECT (impl->gldrawable),
- &gldrawable_location);
+ (gpointer *) &impl->gldrawable);
impl->gldrawable = NULL;
}
@@ -361,18 +360,16 @@
if (impl->gldrawable != NULL)
{
- gpointer gldrawable_location = impl->gldrawable;
g_object_remove_weak_pointer (G_OBJECT (impl->gldrawable),
- &gldrawable_location);
+ (gpointer *) &impl->gldrawable);
impl->gldrawable = NULL;
}
if (gldrawable != NULL && GDK_IS_GL_DRAWABLE (gldrawable))
{
impl->gldrawable = gldrawable;
- gpointer gldrawable_location = impl->gldrawable;
- g_object_add_weak_pointer (G_OBJECT (impl->gldrawable),
- &gldrawable_location);
+ g_object_add_weak_pointer (G_OBJECT (gldrawable),
+ (gpointer *) &impl->gldrawable);
}
}
Modified: branches/0.17/mozilla-plugin/configure.ac
===================================================================
--- branches/0.17/mozilla-plugin/configure.ac 2008-09-06 05:06:40 UTC (rev 3585)
+++ branches/0.17/mozilla-plugin/configure.ac 2008-09-06 05:41:07 UTC (rev 3586)
@@ -29,17 +29,15 @@
[PKG_CHECK_MODULES([MOZILLA_PLUGIN], [mozilla-plugin >= 1.6],
[mozilla_plugin_pkg=mozilla-plugin],
[have_mozilla_plugin=no])])])])
-PKG_CHECK_MODULES([GTK], [gtk+-2.0], , [have_gtk=no])
+PKG_CHECK_MODULES([DBUS_G], [dbus-glib-1], , [have_dbus_glib=no])
+AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool])
-if test "X$enable_mozilla_plugin" != "Xno"; then
- if test "X$have_mozilla_plugin" = "Xno"; then
- AC_MSG_FAILURE([Mozilla plug-in development headers are required to build the Mozilla plug-in.])
- fi
- if test "X$have_gtk" = "Xno"; then
- AC_MSG_FAILURE([GTK+ is required to build the Mozilla plug-in])
- fi
-fi
+AS_IF([test "X$enable_mozilla_plugin" != "Xno"],
+ [AS_IF([test "X$have_mozilla_plugin" = "Xno"],
+ [AC_MSG_FAILURE([Mozilla plug-in development headers are required to build the Mozilla plug-in.])])
+ AS_IF([test "X$have_dbus_glib" = "Xno"],
+ [AC_MSG_FAILURE([The D-Bus GLib binding is required to build the Mozilla plug-in])])])
AM_CONDITIONAL([ENABLE_MOZILLA_PLUGIN],
- [test "X$enable_mozilla_plugin" != "Xno" -a "X$have_gtk" != "Xno"])
+ [test "X$enable_mozilla_plugin" != "Xno" -a "X$have_dbus_glib" != "Xno"])
AC_OUTPUT
Modified: branches/0.17/mozilla-plugin/src/Makefile.am
===================================================================
--- branches/0.17/mozilla-plugin/src/Makefile.am 2008-09-06 05:06:40 UTC (rev 3585)
+++ branches/0.17/mozilla-plugin/src/Makefile.am 2008-09-06 05:41:07 UTC (rev 3586)
@@ -1,17 +1,28 @@
AM_CPPFLAGS = \
-DGTK_DISABLE_DEPRECATED \
-DOPENVRML_LIBEXECDIR_=\"$(libexecdir)\"
-AM_CXXFLAGS = $(MOZILLA_PLUGIN_CFLAGS) $(GTK_CFLAGS)
+AM_CXXFLAGS = $(MOZILLA_PLUGIN_CFLAGS) $(DBUS_G_CFLAGS)
mozpluginsdir = $(libdir)/mozilla/plugins
if ENABLE_MOZILLA_PLUGIN
mozplugins_LTLIBRARIES = openvrml.la
+BUILT_SOURCES = browser-host-server-glue.h
endif
openvrml_la_SOURCES = openvrml.cpp
openvrml_la_LDFLAGS = \
-module -avoid-version \
- $(MOZILLA_PLUGIN_LIBS)
+ $(MOZILLA_PLUGIN_LIBS) \
+ $(DBUS_G_LIBS)
+browser-host-server-glue.h: $(top_srcdir)/../src/openvrml-xembed/browser-host.xml
+ $(LIBTOOL) --mode=execute $(DBUS_BINDING_TOOL) \
+ --prefix=openvrml_np_browser_host \
+ --mode=glib-server \
+ --output=$@ \
+ $?
+
EXTRA_DIST = $(openvrml_la_SOURCES)
+
+CLEANFILES = $(BUILT_SOURCES)
Modified: branches/0.17/mozilla-plugin/src/openvrml.cpp
===================================================================
--- branches/0.17/mozilla-plugin/src/openvrml.cpp 2008-09-06 05:06:40 UTC (rev 3585)
+++ branches/0.17/mozilla-plugin/src/openvrml.cpp 2008-09-06 05:41:07 UTC (rev 3586)
@@ -2,7 +2,7 @@
//
// OpenVRML Mozilla plug-in
//
-// Copyright 2004, 2005, 2006, 2007 Braden McDaniel
+// Copyright 2004, 2005, 2006, 2007, 2008 Braden McDaniel
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
@@ -33,21 +33,50 @@
# include <boost/scoped_ptr.hpp>
# include <npupp.h>
# if defined MOZ_X11
-# include <fcntl.h>
-# include <gdk/gdkx.h>
+# include <dbus/dbus-glib-bindings.h>
# else
# error Unsupported toolkit.
# endif
+# define OPENVRML_NP_TYPE_BROWSER_HOST (openvrml_np_browser_host_get_type())
+# define OPENVRML_NP_BROWSER_HOST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), OPENVRML_NP_TYPE_BROWSER_HOST, OpenvrmlNpBrowserHost))
+# define OPENVRML_NP_BROWSER_HOST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), OPENVRML_NP_TYPE_BROWSER_HOST, OpenvrmlNpBrowserHostClass))
+
+G_BEGIN_DECLS
+
+typedef struct OpenvrmlNpBrowserHost_ OpenvrmlNpBrowserHost;
+typedef struct OpenvrmlNpBrowserHostClass_ OpenvrmlNpBrowserHostClass;
+
+struct OpenvrmlNpBrowserHost_ {
+ GObject parent;
+ gchar * path;
+ NPP npp;
+};
+
+struct OpenvrmlNpBrowserHostClass_ {
+ GObjectClass parent;
+ DBusGConnection * connection;
+ gchar * host_name;
+};
+
+GType openvrml_np_browser_host_get_type();
+
+int
+openvrml_np_browser_host_get_url(OpenvrmlNpBrowserHost * host, const char * url,
+ GError ** error);
+void openvrml_np_browser_host_set_world_url(OpenvrmlNpBrowserHost * host,
+ const char * url, GError ** error);
+
+G_END_DECLS
+
+# include "browser-host-server-glue.h"
+
using namespace boost::multi_index::detail; // for scope_guard
namespace {
void printerr(const char * str);
- extern "C" gboolean request_data_available(GIOChannel * source,
- GIOCondition condition,
- gpointer data);
class plugin_instance;
typedef bool (plugin_instance::*script_callback_t)(const NPVariant *,
@@ -71,18 +100,12 @@
class plugin_instance : boost::noncopyable {
- friend gboolean request_data_available(GIOChannel * source,
- GIOCondition condition,
- gpointer data);
-
const NPP npp;
- GdkNativeWindow window;
+ void * window;
int x, y;
int width, height;
- GIOChannel * command_channel;
- GIOChannel * request_channel;
- guint request_channel_watch_id;
- std::stringstream request_line;
+ OpenvrmlNpBrowserHost * browser_host;
+ DBusGProxy * browser;
public:
NPObject * const npobj;
@@ -93,8 +116,11 @@
void set_window(NPWindow & window)
throw (std::bad_alloc, std::runtime_error);
void HandleEvent(void * event) throw ();
- ssize_t write_command(const std::string & command);
+ NPError new_stream(NPMIMEType type, NPStream * stream);
+ NPError destroy_stream(NPStream * stream);
+ int32 write(NPStream * stream, int32 len, void * buffer);
+
//
// Scripting API method implementations.
//
@@ -105,6 +131,87 @@
};
} // namespace
+G_DEFINE_TYPE(OpenvrmlNpBrowserHost, openvrml_np_browser_host, G_TYPE_OBJECT)
+
+void openvrml_np_browser_host_init(OpenvrmlNpBrowserHost * const host)
+{
+ static size_t count = 0;
+ host->path = g_strdup_printf("/org/openvrml/BrowserHost/%u/%lu",
+ getpid(), count++);
+ dbus_g_connection_register_g_object(
+ OPENVRML_NP_BROWSER_HOST_GET_CLASS(host)->connection,
+ host->path,
+ G_OBJECT(host));
+}
+
+namespace {
+ enum np_host_signal_id {
+ shutdown_id,
+ last_signal_id
+ };
+
+ G_GNUC_INTERNAL guint signals[last_signal_id];
+}
+
+void openvrml_np_browser_host_class_init(OpenvrmlNpBrowserHostClass * klass)
+{
+ signals[shutdown_id] =
+ g_signal_new("shutdown",
+ G_OBJECT_CLASS_TYPE(klass),
+ GSignalFlags(G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED),
+ 0,
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ GError * error = 0;
+ scope_guard error_guard = make_guard(g_error_free, boost::ref(error));
+ klass->connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
+ if (!klass->connection) {
+ g_critical("Failed to open connection to bus: %s", error->message);
+ return;
+ }
+
+ klass->host_name = g_strdup_printf("org.openvrml.BrowserHost-%u",
+ getpid());
+
+ DBusGProxy * driver_proxy =
+ dbus_g_proxy_new_for_name(klass->connection,
+ DBUS_SERVICE_DBUS,
+ DBUS_PATH_DBUS,
+ DBUS_INTERFACE_DBUS);
+ scope_guard driver_proxy_guard = make_guard(g_object_unref, driver_proxy);
+ boost::ignore_unused_variable_warning(driver_proxy_guard);
+
+ guint request_ret;
+ if (!org_freedesktop_DBus_request_name(driver_proxy,
+ klass->host_name,
+ 0, &request_ret,
+ &error)) {
+ g_critical("Request for name \"%s\" failed: %s",
+ klass->host_name, error->message);
+ return;
+ }
+
+ dbus_g_object_type_install_info(
+ OPENVRML_NP_TYPE_BROWSER_HOST,
+ &dbus_glib_openvrml_np_browser_host_object_info);
+ error_guard.dismiss();
+}
+
+int openvrml_np_browser_host_get_url(OpenvrmlNpBrowserHost * const host,
+ const char * const url,
+ GError ** /* error */)
+{
+ return NPN_GetURL(host->npp, url, 0);
+}
+
+void openvrml_np_browser_host_set_world_url(OpenvrmlNpBrowserHost * /* host */,
+ const char * /* url */,
+ GError ** /* error */)
+{
+}
+
char * NP_GetMIMEDescription()
{
return NPP_GetMIMEDescription();
@@ -279,9 +386,11 @@
char * NPP_GetMIMEDescription()
{
- return "model/x3d+vrml:x3dv:X3D world;"
- "model/vrml:wrl:VRML world;"
- "x-world/x-vrml:wrl:VRML world";
+ static const char mimeDescription[] =
+ "model/x3d+vrml:x3dv:X3D world;"
+ "model/vrml:wrl:VRML world;"
+ "x-world/x-vrml:wrl:VRML world";
+ return const_cast<char *>(&mimeDescription[0]);
}
NPError NPP_Initialize()
@@ -431,20 +540,14 @@
NPBool /* seekable */,
uint16 * const stype)
{
- if (!instance) { return NPERR_INVALID_INSTANCE_ERROR; }
+ if (!instance || !instance->pdata) { return NPERR_INVALID_INSTANCE_ERROR; }
+
*stype = NP_NORMAL;
- assert(instance->pdata);
plugin_instance & pluginInstance =
*static_cast<plugin_instance *>(instance->pdata);
- std::ostringstream command;
- command << "new-stream " << size_t(stream) << ' ' << type << ' '
- << stream->url << '\n';
- const ssize_t bytes_written = pluginInstance.write_command(command.str());
- return (bytes_written < 0)
- ? NPERR_GENERIC_ERROR
- : NPERR_NO_ERROR;
+ return pluginInstance.new_stream(type, stream);
}
NPError NPP_DestroyStream(const NPP instance,
@@ -456,12 +559,7 @@
plugin_instance & pluginInstance =
*static_cast<plugin_instance *>(instance->pdata);
- std::ostringstream command;
- command << "destroy-stream " << size_t(stream) << '\n';
- const ssize_t bytes_written = pluginInstance.write_command(command.str());
- return (bytes_written < 0)
- ? NPERR_GENERIC_ERROR
- : NPERR_NO_ERROR;
+ return pluginInstance.destroy_stream(stream);
}
/* PLUGIN DEVELOPERS:
@@ -499,14 +597,7 @@
plugin_instance & pluginInstance =
*static_cast<plugin_instance *>(instance->pdata);
- std::ostringstream command;
- command << "write " << size_t(stream) << ' ' << ' ' << len << '\n';
- for (int32 i = 0; i < len; ++i) {
- command.put(static_cast<char *>(buffer)[i]);
- }
- const ssize_t bytes_written = pluginInstance.write_command(command.str());
-
- return bytes_written; // The number of bytes accepted.
+ return pluginInstance.write(stream, len, buffer);
}
...
[truncated message content] |
|
From: <br...@us...> - 2008-09-09 05:37:13
|
Revision: 3591
http://openvrml.svn.sourceforge.net/openvrml/?rev=3591&view=rev
Author: braden
Date: 2008-09-09 05:37:24 +0000 (Tue, 09 Sep 2008)
Log Message:
-----------
Changed to CRLF line endings.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/sdl-viewer/sdl-viewer.vcproj
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-09-09 05:25:47 UTC (rev 3590)
+++ branches/0.17/ChangeLog 2008-09-09 05:37:24 UTC (rev 3591)
@@ -1,3 +1,8 @@
+2008-09-09 Braden McDaniel <br...@en...>
+
+ * ide-projects/Windows/VisualC9_0/OpenVRML/sdl-viewer/sdl-viewer.vcproj:
+ Changed to CRLF line endings.
+
2008-09-06 Braden McDaniel <br...@en...>
Use D-Bus for communication between openvrml-xembed and its hosts,
Modified: branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/sdl-viewer/sdl-viewer.vcproj
===================================================================
--- branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/sdl-viewer/sdl-viewer.vcproj 2008-09-09 05:25:47 UTC (rev 3590)
+++ branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/sdl-viewer/sdl-viewer.vcproj 2008-09-09 05:37:24 UTC (rev 3591)
@@ -1,212 +1,212 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="sdl-viewer"
- ProjectGUID="{2DD5D192-3E85-4E64-854B-DF7A1FF06B76}"
- RootNamespace="sdl-viewer"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\openvrml;..\..\..\..\..\src\libopenvrml;"..\openvrml-gl";"..\..\..\..\..\src\libopenvrml-gl""
- PreprocessorDefinitions="OPENVRML_USE_DLL;OPENVRML_GL_USE_DLL"
- MinimalRebuild="true"
- BasicRuntimeChecks="0"
- RuntimeLibrary="3"
- TreatWChar_tAsBuiltInType="true"
- ForceConformanceInForLoopScope="true"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- DisableSpecificWarnings="4250;4251;4275;4290;4355"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="opengl32.lib glu32.lib SDLmain.lib SDL.lib"
- OutputFile="$(SolutionDir)..\bin\sdl-viewerd.exe"
- LinkIncremental="2"
- IgnoreDefaultLibraryNames="msvcrt.lib"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/sdl-viewer.pdb"
- SubSystem="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- WholeProgramOptimization="true"
- AdditionalIncludeDirectories="..\..\..\..\..\src\libopenvrml;"..\..\..\..\..\src\libopenvrml-gl";..\openvrml;"..\openvrml-gl""
- PreprocessorDefinitions="OPENVRML_USE_DLL;OPENVRML_GL_USE_DLL;NDEBUG"
- RuntimeLibrary="2"
- TreatWChar_tAsBuiltInType="true"
- ForceConformanceInForLoopScope="true"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- DisableSpecificWarnings="4226;4250;4251;4275;4290;4355;4800"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="opengl32.lib glu32.lib SDLmain.lib SDL.lib"
- OutputFile="$(SolutionDir)..\bin\sdl-viewer.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- LinkTimeCodeGeneration="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\..\..\examples\sdl_viewer.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="sdl-viewer"
+ ProjectGUID="{2DD5D192-3E85-4E64-854B-DF7A1FF06B76}"
+ RootNamespace="sdl-viewer"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\openvrml;..\..\..\..\..\src\libopenvrml;"..\openvrml-gl";"..\..\..\..\..\src\libopenvrml-gl""
+ PreprocessorDefinitions="OPENVRML_USE_DLL;OPENVRML_GL_USE_DLL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="3"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ DisableSpecificWarnings="4250;4251;4275;4290;4355"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="opengl32.lib glu32.lib SDLmain.lib SDL.lib"
+ OutputFile="$(SolutionDir)..\bin\sdl-viewerd.exe"
+ LinkIncremental="2"
+ IgnoreDefaultLibraryNames="msvcrt.lib"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/sdl-viewer.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="..\..\..\..\..\src\libopenvrml;"..\..\..\..\..\src\libopenvrml-gl";..\openvrml;"..\openvrml-gl""
+ PreprocessorDefinitions="OPENVRML_USE_DLL;OPENVRML_GL_USE_DLL;NDEBUG"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ DisableSpecificWarnings="4226;4250;4251;4275;4290;4355;4800"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="opengl32.lib glu32.lib SDLmain.lib SDL.lib"
+ OutputFile="$(SolutionDir)..\bin\sdl-viewer.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\..\..\..\examples\sdl_viewer.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-09-09 07:17:24
|
Revision: 3594
http://openvrml.svn.sourceforge.net/openvrml/?rev=3594&view=rev
Author: braden
Date: 2008-09-09 07:17:33 +0000 (Tue, 09 Sep 2008)
Log Message:
-----------
Order include directories consistently for Debug and Release configurations.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.vcproj
branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/sdl-viewer/sdl-viewer.vcproj
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-09-09 07:13:24 UTC (rev 3593)
+++ branches/0.17/ChangeLog 2008-09-09 07:17:33 UTC (rev 3594)
@@ -1,5 +1,13 @@
2008-09-09 Braden McDaniel <br...@en...>
+ Order include directories consistently for Debug and Release
+ configurations.
+
+ * ide-projects/Windows/VisualC9_0/OpenVRML/sdl-viewer/sdl-viewer.vcproj
+ * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.vcproj
+
+2008-09-09 Braden McDaniel <br...@en...>
+
* ide-projects/Windows/VisualC9_0/OpenVRML/sdl-viewer/sdl-viewer.vcproj:
Changed to CRLF line endings.
Modified: branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.vcproj
===================================================================
--- branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.vcproj 2008-09-09 07:13:24 UTC (rev 3593)
+++ branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.vcproj 2008-09-09 07:17:33 UTC (rev 3594)
@@ -41,7 +41,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories=".;"..\..\..\..\..\src\libopenvrml-gl";..\openvrml;..\..\..\..\..\src\libopenvrml"
+ AdditionalIncludeDirectories=".;..\openvrml;"..\..\..\..\..\src\libopenvrml-gl";..\..\..\..\..\src\libopenvrml"
PreprocessorDefinitions="HAVE_WINDOWS_H;OPENVRML_USE_DLL;OPENVRML_GL_BUILD_DLL"
MinimalRebuild="true"
BasicRuntimeChecks="0"
@@ -59,7 +59,7 @@
/>
<Tool
Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories="..\..\..\..\..\src\libopenvrml"
+ AdditionalIncludeDirectories=""
/>
<Tool
Name="VCPreLinkEventTool"
@@ -123,7 +123,7 @@
Optimization="3"
InlineFunctionExpansion="1"
OmitFramePointers="true"
- AdditionalIncludeDirectories=""..\..\..\..\..\src\libopenvrml-gl";..\..\..\..\..\src\libopenvrml;..\openvrml;."
+ AdditionalIncludeDirectories=".;..\openvrml;"..\..\..\..\..\src\libopenvrml-gl";..\..\..\..\..\src\libopenvrml"
PreprocessorDefinitions="HAVE_WINDOWS_H;OPENVRML_GL_BUILD_DLL;OPENVRML_USE_DLL;NDEBUG"
StringPooling="true"
RuntimeLibrary="2"
Modified: branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/sdl-viewer/sdl-viewer.vcproj
===================================================================
--- branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/sdl-viewer/sdl-viewer.vcproj 2008-09-09 07:13:24 UTC (rev 3593)
+++ branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/sdl-viewer/sdl-viewer.vcproj 2008-09-09 07:17:33 UTC (rev 3594)
@@ -41,7 +41,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\openvrml;..\..\..\..\..\src\libopenvrml;"..\openvrml-gl";"..\..\..\..\..\src\libopenvrml-gl""
+ AdditionalIncludeDirectories=""..\openvrml-gl";..\openvrml;"..\..\..\..\..\src\libopenvrml-gl";..\..\..\..\..\src\libopenvrml"
PreprocessorDefinitions="OPENVRML_USE_DLL;OPENVRML_GL_USE_DLL"
MinimalRebuild="true"
BasicRuntimeChecks="0"
@@ -124,7 +124,7 @@
Name="VCCLCompilerTool"
Optimization="3"
WholeProgramOptimization="true"
- AdditionalIncludeDirectories="..\..\..\..\..\src\libopenvrml;"..\..\..\..\..\src\libopenvrml-gl";..\openvrml;"..\openvrml-gl""
+ AdditionalIncludeDirectories=""..\openvrml-gl";..\openvrml;"..\..\..\..\..\src\libopenvrml-gl";..\..\..\..\..\src\libopenvrml"
PreprocessorDefinitions="OPENVRML_USE_DLL;OPENVRML_GL_USE_DLL;NDEBUG"
RuntimeLibrary="2"
TreatWChar_tAsBuiltInType="true"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-09-09 07:57:43
|
Revision: 3597
http://openvrml.svn.sourceforge.net/openvrml/?rev=3597&view=rev
Author: braden
Date: 2008-09-09 07:57:53 +0000 (Tue, 09 Sep 2008)
Log Message:
-----------
No reason to define span before setting its value.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/src/libopenvrml/openvrml/bounding_volume.cpp
Property Changed:
----------------
branches/0.17/
Property changes on: branches/0.17
___________________________________________________________________
Added: svn:mergeinfo
+ /trunk:3596
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-09-09 07:53:05 UTC (rev 3596)
+++ branches/0.17/ChangeLog 2008-09-09 07:57:53 UTC (rev 3597)
@@ -1,5 +1,12 @@
2008-09-09 Braden McDaniel <br...@en...>
+ * src/libopenvrml/openvrml/bounding_volume.cpp
+ (openvrml::bounding_sphere::do_enclose(const
+ std::vector<vec3f>&)): No reason to define span before
+ setting its value.
+
+2008-09-09 Braden McDaniel <br...@en...>
+
Order include directories consistently for Debug and Release
configurations.
Modified: branches/0.17/src/libopenvrml/openvrml/bounding_volume.cpp
===================================================================
--- branches/0.17/src/libopenvrml/openvrml/bounding_volume.cpp 2008-09-09 07:53:05 UTC (rev 3596)
+++ branches/0.17/src/libopenvrml/openvrml/bounding_volume.cpp 2008-09-09 07:57:53 UTC (rev 3597)
@@ -611,8 +611,7 @@
//
// Pick the two points most distant from one another.
//
- vec3f span;
- span = *max_p[0] - *min_p[0];
+ vec3f span = *max_p[0] - *min_p[0];
float dx = span.dot(span);
span = *max_p[1] - *min_p[1];
float dy = span.dot(span);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-09-10 05:14:52
|
Revision: 3606
http://openvrml.svn.sourceforge.net/openvrml/?rev=3606&view=rev
Author: braden
Date: 2008-09-10 05:15:03 +0000 (Wed, 10 Sep 2008)
Log Message:
-----------
Changed to CRLF line endings.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/OpenVRML.sln
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-09-10 05:05:36 UTC (rev 3605)
+++ branches/0.17/ChangeLog 2008-09-10 05:15:03 UTC (rev 3606)
@@ -1,3 +1,8 @@
+2008-09-10 Braden McDaniel <br...@en...>
+
+ * ide-projects/Windows/VisualC9_0/OpenVRML/OpenVRML.sln: Changed
+ to CRLF line endings.
+
2008-09-09 Braden McDaniel <br...@en...>
* src/libopenvrml/openvrml/bounding_volume.cpp
Modified: branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/OpenVRML.sln
===================================================================
--- branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/OpenVRML.sln 2008-09-10 05:05:36 UTC (rev 3605)
+++ branches/0.17/ide-projects/Windows/VisualC9_0/OpenVRML/OpenVRML.sln 2008-09-10 05:15:03 UTC (rev 3606)
@@ -1,38 +1,38 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual C++ Express 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openvrml", "openvrml\openvrml.vcproj", "{E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openvrml-gl", "openvrml-gl\openvrml-gl.vcproj", "{141F90C2-6630-4D7A-834F-D5D57C6CFC24}"
- ProjectSection(ProjectDependencies) = postProject
- {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C} = {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sdl-viewer", "sdl-viewer\sdl-viewer.vcproj", "{2DD5D192-3E85-4E64-854B-DF7A1FF06B76}"
- ProjectSection(ProjectDependencies) = postProject
- {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C} = {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}
- {141F90C2-6630-4D7A-834F-D5D57C6CFC24} = {141F90C2-6630-4D7A-834F-D5D57C6CFC24}
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}.Debug|Win32.ActiveCfg = Debug|Win32
- {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}.Debug|Win32.Build.0 = Debug|Win32
- {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}.Release|Win32.ActiveCfg = Release|Win32
- {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}.Release|Win32.Build.0 = Release|Win32
- {141F90C2-6630-4D7A-834F-D5D57C6CFC24}.Debug|Win32.ActiveCfg = Debug|Win32
- {141F90C2-6630-4D7A-834F-D5D57C6CFC24}.Debug|Win32.Build.0 = Debug|Win32
- {141F90C2-6630-4D7A-834F-D5D57C6CFC24}.Release|Win32.ActiveCfg = Release|Win32
- {141F90C2-6630-4D7A-834F-D5D57C6CFC24}.Release|Win32.Build.0 = Release|Win32
- {2DD5D192-3E85-4E64-854B-DF7A1FF06B76}.Debug|Win32.ActiveCfg = Debug|Win32
- {2DD5D192-3E85-4E64-854B-DF7A1FF06B76}.Debug|Win32.Build.0 = Debug|Win32
- {2DD5D192-3E85-4E64-854B-DF7A1FF06B76}.Release|Win32.ActiveCfg = Release|Win32
- {2DD5D192-3E85-4E64-854B-DF7A1FF06B76}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual C++ Express 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openvrml", "openvrml\openvrml.vcproj", "{E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openvrml-gl", "openvrml-gl\openvrml-gl.vcproj", "{141F90C2-6630-4D7A-834F-D5D57C6CFC24}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C} = {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sdl-viewer", "sdl-viewer\sdl-viewer.vcproj", "{2DD5D192-3E85-4E64-854B-DF7A1FF06B76}"
+ ProjectSection(ProjectDependencies) = postProject
+ {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C} = {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}
+ {141F90C2-6630-4D7A-834F-D5D57C6CFC24} = {141F90C2-6630-4D7A-834F-D5D57C6CFC24}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}.Debug|Win32.Build.0 = Debug|Win32
+ {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}.Release|Win32.ActiveCfg = Release|Win32
+ {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}.Release|Win32.Build.0 = Release|Win32
+ {141F90C2-6630-4D7A-834F-D5D57C6CFC24}.Debug|Win32.ActiveCfg = Debug|Win32
+ {141F90C2-6630-4D7A-834F-D5D57C6CFC24}.Debug|Win32.Build.0 = Debug|Win32
+ {141F90C2-6630-4D7A-834F-D5D57C6CFC24}.Release|Win32.ActiveCfg = Release|Win32
+ {141F90C2-6630-4D7A-834F-D5D57C6CFC24}.Release|Win32.Build.0 = Release|Win32
+ {2DD5D192-3E85-4E64-854B-DF7A1FF06B76}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2DD5D192-3E85-4E64-854B-DF7A1FF06B76}.Debug|Win32.Build.0 = Debug|Win32
+ {2DD5D192-3E85-4E64-854B-DF7A1FF06B76}.Release|Win32.ActiveCfg = Release|Win32
+ {2DD5D192-3E85-4E64-854B-DF7A1FF06B76}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-09-11 04:16:05
|
Revision: 3613
http://openvrml.svn.sourceforge.net/openvrml/?rev=3613&view=rev
Author: braden
Date: 2008-09-11 04:16:14 +0000 (Thu, 11 Sep 2008)
Log Message:
-----------
Added projects for the parse-vrml97 and parse-x3dvrml test programs to the Visual C++ solution.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/ide-projects/Makefile.am
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-09-11 04:13:47 UTC (rev 3612)
+++ branches/0.17/ChangeLog 2008-09-11 04:16:14 UTC (rev 3613)
@@ -1,5 +1,15 @@
2008-09-10 Braden McDaniel <br...@en...>
+ Added projects for the parse-vrml97 and parse-x3dvrml test
+ programs to the Visual C++ solution.
+
+ * ide-projects/Makefile.am: Distribute the project files.
+ * ide-projects/Windows/VisualC9_0/OpenVRML/OpenVRML.sln
+ * ide-projects/Windows/VisualC9_0/OpenVRML/parse-x3dvrml/parse-x3dvrml.vcproj
+ * ide-projects/Windows/VisualC9_0/OpenVRML/parse-vrml97/parse-vrml97.vcproj
+
+2008-09-10 Braden McDaniel <br...@en...>
+
* ide-projects/Windows/VisualC9_0/OpenVRML/OpenVRML.sln: Changed
to CRLF line endings.
Modified: branches/0.17/ide-projects/Makefile.am
===================================================================
--- branches/0.17/ide-projects/Makefile.am 2008-09-11 04:13:47 UTC (rev 3612)
+++ branches/0.17/ide-projects/Makefile.am 2008-09-11 04:16:14 UTC (rev 3613)
@@ -6,6 +6,8 @@
Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.vcproj \
Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl-config.h \
Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc \
+ Windows/VisualC9_0/OpenVRML/sdl-viewer/parse-vrml97.vcproj \
+ Windows/VisualC9_0/OpenVRML/sdl-viewer/parse-x3dvrml.vcproj \
Windows/VisualC9_0/OpenVRML/sdl-viewer/sdl-viewer.vcproj
EXTRA_DIST = $(VISUALC9_0_FILES)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-09-11 04:20:37
|
Revision: 3614
http://openvrml.svn.sourceforge.net/openvrml/?rev=3614&view=rev
Author: braden
Date: 2008-09-11 04:20:44 +0000 (Thu, 11 Sep 2008)
Log Message:
-----------
Added a Visual C++ project file for the pretty-print example.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/examples/pretty_print.cpp
branches/0.17/ide-projects/Makefile.am
Property Changed:
----------------
branches/0.17/
Property changes on: branches/0.17
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:3596
+ /trunk:3596,3612
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-09-11 04:16:14 UTC (rev 3613)
+++ branches/0.17/ChangeLog 2008-09-11 04:20:44 UTC (rev 3614)
@@ -1,3 +1,15 @@
+2008-09-11 Braden McDaniel <br...@en...>
+
+ Added a Visual C++ project file for the pretty-print example.
+
+ * examples/pretty_print.cpp: Removed uses of "interface" as an
+ identifier for Windows friendliness.
+ * ide-projects/Makefile.am: Distribute pretty-print.vcproj.
+ * ide-projects/Windows/VisualC9_0/OpenVRML/OpenVRML.sln: Added the
+ pretty-print project.
+ * ide-projects/Windows/VisualC9_0/OpenVRML/pretty-print/pretty-print.vcproj:
+ Added.
+
2008-09-10 Braden McDaniel <br...@en...>
Added projects for the parse-vrml97 and parse-x3dvrml test
Modified: branches/0.17/examples/pretty_print.cpp
===================================================================
--- branches/0.17/examples/pretty_print.cpp 2008-09-11 04:16:14 UTC (rev 3613)
+++ branches/0.17/examples/pretty_print.cpp 2008-09-11 04:20:44 UTC (rev 3614)
@@ -161,11 +161,11 @@
using std::vector;
a.out << a.indent_ << "EXTERNPROTO " << node_type_id << " [\n";
++a.indent_;
- for (node_interface_set::const_iterator interface =
+ for (node_interface_set::const_iterator interface_ =
interfaces.begin();
- interface != interfaces.end();
- ++interface) {
- a.out << a.indent_ << *interface << '\n';
+ interface_ != interfaces.end();
+ ++interface_) {
+ a.out << a.indent_ << *interface_ << '\n';
}
--a.indent_;
a.out << a.indent_ << "] [\n";
@@ -205,11 +205,11 @@
a(a)
{}
- void operator()(const node_interface & interface) const
+ void operator()(const node_interface & interface_) const
{
- a.out << a.indent_ << interface;
- if (interface.type == node_interface::eventin_id
- || interface.type == node_interface::eventout_id) {
+ a.out << a.indent_ << interface_;
+ if (interface_.type == node_interface::eventin_id
+ || interface_.type == node_interface::eventout_id) {
a.out << '\n';
}
}
@@ -284,9 +284,9 @@
a(a)
{}
- void operator()(const node_interface & interface) const
+ void operator()(const node_interface & interface_) const
{
- a.out << a.indent_ << interface;
+ a.out << a.indent_ << interface_;
}
actions & a;
Modified: branches/0.17/ide-projects/Makefile.am
===================================================================
--- branches/0.17/ide-projects/Makefile.am 2008-09-11 04:16:14 UTC (rev 3613)
+++ branches/0.17/ide-projects/Makefile.am 2008-09-11 04:20:44 UTC (rev 3614)
@@ -6,8 +6,9 @@
Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.vcproj \
Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl-config.h \
Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc \
- Windows/VisualC9_0/OpenVRML/sdl-viewer/parse-vrml97.vcproj \
- Windows/VisualC9_0/OpenVRML/sdl-viewer/parse-x3dvrml.vcproj \
+ Windows/VisualC9_0/OpenVRML/parse-vrml97/parse-vrml97.vcproj \
+ Windows/VisualC9_0/OpenVRML/parse-x3dvrml/parse-x3dvrml.vcproj \
+ Windows/VisualC9_0/OpenVRML/pretty-print/pretty-print.vcproj \
Windows/VisualC9_0/OpenVRML/sdl-viewer/sdl-viewer.vcproj
EXTRA_DIST = $(VISUALC9_0_FILES)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-10-03 22:28:34
|
Revision: 3711
http://openvrml.svn.sourceforge.net/openvrml/?rev=3711&view=rev
Author: braden
Date: 2008-10-03 22:28:24 +0000 (Fri, 03 Oct 2008)
Log Message:
-----------
Revert to using libglade rather than GtkBuilder in openvrml-player.
Modified Paths:
--------------
branches/0.17/ChangeLog
branches/0.17/configure.ac
branches/0.17/src/Makefile.am
branches/0.17/src/openvrml-player/player.cpp
Added Paths:
-----------
branches/0.17/src/openvrml-player/openvrml-player.glade
Removed Paths:
-------------
branches/0.17/src/openvrml-player/openvrml-player.ui
Modified: branches/0.17/ChangeLog
===================================================================
--- branches/0.17/ChangeLog 2008-10-03 17:32:36 UTC (rev 3710)
+++ branches/0.17/ChangeLog 2008-10-03 22:28:24 UTC (rev 3711)
@@ -1,3 +1,32 @@
+2008-10-03 Braden McDaniel <br...@en...>
+
+ Revert to using libglade rather than GtkBuilder in openvrml-player.
+
+ * configure.ac: Don't require Gtk+ 2.12; check for libglade.
+ * src/Makefile.am
+ (openvrml_player_openvrml_player_CXXFLAGS): Added GLADE_CFLAGS.
+ (openvrml_player_openvrml_player_LDFLAGS): Added GLADE_LIBS.
+ (openvrml_player_gladedir): Glade XML installation directory;
+ replaces openvrml_player_uidir.
+ (dist_openvrml_player_glade_DATA): Glade XML; replaces
+ dist_openvrml_player_ui_DATA.
+ * src/openvrml-player/openvrml-player.glade: Added; Glade XML.
+ * src/openvrml-player/openvrml-player.ui: Removed.
+ * src/openvrml-player/player.cpp
+ (main(int, char *[])): Use libglade instead of GtkBuilder.
+ (xml_new(GnomeProgram &)): Replaces builder_new; create the
+ GladeXML structure.
+ (openvrml_player_build_file_chooser_dialog(GladeXML *, GType,
+ GladeWidgetInfo *)): Create an OpenvrmlPlayerFileChooserDialog for
+ libglade.
+ (openvrml_player_build_curl_browser_host(GladeXML *, GType,
+ GladeWidgetInfo *)): Create an OpenvrmlPlayerCurlBrowserHost for
+ libglade.
+ (openvrml_player_connect_func(const gchar *, GObject *, const
+ gchar *, const gchar *, GObject *, gboolean, gpointer)):
+ Connection callback function passed to
+ glade_xml_signal_autoconnect_full.
+
2008-10-02 Braden McDaniel <br...@en...>
Keep track of host instances in openvrml-xembed and shut down when
Modified: branches/0.17/configure.ac
===================================================================
--- branches/0.17/configure.ac 2008-10-03 17:32:36 UTC (rev 3710)
+++ branches/0.17/configure.ac 2008-10-03 22:28:24 UTC (rev 3711)
@@ -147,11 +147,9 @@
session_bus_servicesdir=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
AC_SUBST([session_bus_servicesdir])
-#
-# openvrml-player uses GtkBuilder, which was introduced in GTK+ 2.12.
-#
-PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.12 gthread-2.0 glib-2.0 >= 2.6], ,
+PKG_CHECK_MODULES([GTK], [gtk+-2.0 gthread-2.0 glib-2.0 >= 2.6], ,
[have_gtk=no])
+PKG_CHECK_MODULES([GLADE], [libglade-2.0], , [have_libglade=no])
#
# openvrml-player uses GNOME_PARAM_GOPTION_CONTEXT, which was
# introduced in libgnome 2.14.
Modified: branches/0.17/src/Makefile.am
===================================================================
--- branches/0.17/src/Makefile.am 2008-10-03 17:32:36 UTC (rev 3710)
+++ branches/0.17/src/Makefile.am 2008-10-03 22:28:24 UTC (rev 3711)
@@ -237,15 +237,17 @@
openvrml_player_openvrml_player_CXXFLAGS = \
$(DBUS_G_CFLAGS) \
$(GNOMEUI_CFLAGS) \
+ $(GLADE_CFLAGS) \
$(CURL_CFLAGS)
openvrml_player_openvrml_player_LDFLAGS = \
-export-dynamic \
$(GNOMEUI_LIBS) \
$(DBUS_G_LIBS) \
+ $(GLADE_LIBS) \
$(CURL_LIBS)
-openvrml_player_uidir = $(datadir)/openvrml-player/ui
-dist_openvrml_player_ui_DATA = openvrml-player/openvrml-player.ui
+openvrml_player_gladedir = $(datadir)/openvrml-player/glade
+dist_openvrml_player_glade_DATA = openvrml-player/openvrml-player.glade
openvrml_player_openvrml_player_SOURCES = \
openvrml-player/filechooserdialog.cpp \
Copied: branches/0.17/src/openvrml-player/openvrml-player.glade (from rev 3583, branches/0.17/src/openvrml-player/openvrml-player.glade)
===================================================================
--- branches/0.17/src/openvrml-player/openvrml-player.glade (rev 0)
+++ branches/0.17/src/openvrml-player/openvrml-player.glade 2008-10-03 22:28:24 UTC (rev 3711)
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<glade-interface>
+ <widget class="GtkWindow" id="window">
+ <property name="default-width">640</property>
+ <property name="default-height">480</property>
+ <signal name="delete-event" handler="openvrml_player_quit"/>
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkMenuBar" id="menubar1">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkMenuItem" id="menuitem1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_File</property>
+ <property name="use_underline">True</property>
+ <child>
+ <widget class="GtkMenu" id="menu1">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkImageMenuItem" id="imagemenuitemopen">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">gtk-open</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ <signal name="activate" handler="openvrml_player_on_file_open_activated" />
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
+ <property name="visible">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkImageMenuItem" id="imagemenuitem5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">gtk-quit</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ <signal name="activate" handler="openvrml_player_quit"/>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkMenuItem" id="menuitem4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Help</property>
+ <property name="use_underline">True</property>
+ <child>
+ <widget class="GtkMenu" id="menu3">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkImageMenuItem" id="imagemenuitem10">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">gtk-about</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ <signal name="activate" handler="openvrml_player_on_about_activated" object="window"/>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkEntry" id="locationentry">
+ <property name="visible">True</property>
+ <signal name="activate" handler="openvrml_player_on_locationentry_activated"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="OpenvrmlPlayerCurlBrowserHost" id="browserhost">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="has-focus">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkStatusbar" id="statusbar1">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="OpenvrmlPlayerFileChooserDialog" id="filechooserdialog">
+ </widget>
+</glade-interface>
Deleted: branches/0.17/src/openvrml-player/openvrml-player.ui
===================================================================
--- branches/0.17/src/openvrml-player/openvrml-player.ui 2008-10-03 17:32:36 UTC (rev 3710)
+++ branches/0.17/src/openvrml-player/openvrml-player.ui 2008-10-03 22:28:24 UTC (rev 3711)
@@ -1,109 +0,0 @@
-<?xml version="1.0"?>
-<interface>
- <object class="GtkUIManager" id="uimanager1">
- <child>
- <object class="GtkActionGroup" id="actiongroup1">
- <child>
- <object class="GtkAction" id="menuitem1">
- <property name="name">menuitem1</property>
- <property name="label" translatable="yes">_File</property>
- </object>
- </child>
- <child>
- <object class="GtkAction" id="imagemenuitemopen">
- <property name="stock_id" translatable="yes">gtk-open</property>
- <property name="name">imagemenuitemopen</property>
- <signal handler="openvrml_player_on_file_open_activated" name="activate"/>
- </object>
- </child>
- <child>
- <object class="GtkAction" id="imagemenuitem5">
- <property name="stock_id" translatable="yes">gtk-quit</property>
- <property name="name">imagemenuitem5</property>
- <signal handler="openvrml_player_quit" name="activate"/>
- </object>
- </child>
- <child>
- <object class="GtkAction" id="menuitem4">
- <property name="name">menuitem4</property>
- <property name="label" translatable="yes">_Help</property>
- </object>
- </child>
- <child>
- <object class="GtkAction" id="imagemenuitem10">
- <property name="stock_id" translatable="yes">gtk-about</property>
- <property name="name">imagemenuitem10</property>
- <signal handler="openvrml_player_on_about_activated" name="activate" object="window"/>
- </object>
- </child>
- </object>
- </child>
- <ui>
- <menubar name="menubar1">
- <menu action="menuitem1">
- <menuitem action="imagemenuitemopen"/>
- <separator/>
- <menuitem action="imagemenuitem5"/>
- </menu>
- <menu action="menuitem4">
- <menuitem action="imagemenuitem10"/>
- </menu>
- </menubar>
- </ui>
- </object>
- <object class="GtkWindow" id="window">
- <property name="default-width">640</property>
- <property name="default-height">480</property>
- <signal handler="openvrml_player_quit" name="delete-event"/>
- <child>
- <object class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <child>
- <object class="GtkMenuBar" constructor="uimanager1" id="menubar1">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <child>
- <object class="GtkEntry" id="locationentry">
- <property name="visible">True</property>
- <signal handler="openvrml_player_on_locationentry_activated" name="activate"/>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="OpenvrmlPlayerCurlBrowserHost" id="browserhost">
- <property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="has-focus">True</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkStatusbar" id="statusbar1">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <object class="OpenvrmlPlayerFileChooserDialog" id="filechooserdialog">
- </object>
-</interface>
Modified: branches/0.17/src/openvrml-player/player.cpp
===================================================================
--- branches/0.17/src/openvrml-player/player.cpp 2008-10-03 17:32:36 UTC (rev 3710)
+++ branches/0.17/src/openvrml-player/player.cpp 2008-10-03 22:28:24 UTC (rev 3711)
@@ -26,7 +26,8 @@
# include <dbus/dbus-glib.h>
# include <libgnomevfs/gnome-vfs.h>
# include <libgnomeui/libgnomeui.h>
-# include <gtk/gtkbuilder.h>
+# include <glade/glade.h>
+# include <glade/glade-build.h>
# include <openvrml-config.h>
# include "curlbrowserhost.h"
@@ -40,7 +41,7 @@
extern "C" {
//
- // GTK+ signal handlers; GtkBuilder needs them to have external linkage in
+ // GTK+ signal handlers; libglade needs them to have external linkage in
// order to connect them.
//
OPENVRML_API void openvrml_player_on_about_activated(GtkWindow * window);
@@ -57,8 +58,28 @@
OPENVRML_API void openvrml_player_quit();
G_GNUC_INTERNAL
+ void
+ openvrml_player_connect_func(const gchar * handler_name,
+ GObject * object,
+ const gchar * signal_name,
+ const gchar * signal_data,
+ GObject * connect_object,
+ gboolean after,
+ gpointer user_data);
+
+ G_GNUC_INTERNAL
void openvrml_player_on_browserhost_realize(GtkWidget * widget,
gpointer user_data);
+ G_GNUC_INTERNAL
+ GtkWidget *
+ openvrml_player_build_file_chooser_dialog(GladeXML * xml,
+ GType widget_type,
+ GladeWidgetInfo * info);
+ G_GNUC_INTERNAL
+ GtkWidget *
+ openvrml_player_build_curl_browser_host(GladeXML * xml,
+ GType widget_type,
+ GladeWidgetInfo * info);
}
namespace {
@@ -71,8 +92,7 @@
OpenvrmlPlayerFileChooserDialog * file_chooser;
};
- G_GNUC_INTERNAL GtkBuilder * builder_new(GnomeProgram & program,
- GError ** error);
+ G_GNUC_INTERNAL GladeXML * xml_new(GnomeProgram & program);
}
int main(int argc, char * argv[])
@@ -128,36 +148,39 @@
GNOME_PARAM_APP_DATADIR, OPENVRML_PLAYER_PKGDATADIR_,
GNOME_PARAM_NONE);
- GError * error = 0;
- scope_guard error_guard = make_guard(g_error_free, ref(error));
- GtkBuilder * const builder = builder_new(*program, &error);
- if (!builder) {
- g_critical("Failed to create UI builder: %s", error->message);
- return EXIT_FAILURE;
- }
+ glade_init();
+ glade_register_widget(OPENVRML_PLAYER_TYPE_FILE_CHOOSER_DIALOG,
+ openvrml_player_build_file_chooser_dialog,
+ 0,
+ 0);
+ glade_register_widget(OPENVRML_PLAYER_TYPE_CURL_BROWSER_HOST,
+ openvrml_player_build_curl_browser_host,
+ 0,
+ 0);
- GtkWidget * const app_window =
- GTK_WIDGET(gtk_builder_get_object(builder, "window"));
+ GladeXML * const xml = xml_new(*program);
+ GtkWidget * const app_window = glade_xml_get_widget(xml, "window");
+
GtkWidget * const file_chooser_dialog =
- GTK_WIDGET(gtk_builder_get_object(builder, "filechooserdialog"));
+ glade_xml_get_widget(xml, "filechooserdialog");
signal_data data = {};
data.browser_host =
OPENVRML_PLAYER_CURL_BROWSER_HOST(
- gtk_builder_get_object(builder, "browserhost"));
+ glade_xml_get_widget(xml, "browserhost"));
g_assert(OPENVRML_PLAYER_IS_CURL_BROWSER_HOST(data.browser_host));
data.location_entry =
- GTK_WIDGET(gtk_builder_get_object(builder, "locationentry"));
+ GTK_WIDGET(glade_xml_get_widget(xml, "locationentry"));
data.file_chooser =
OPENVRML_PLAYER_FILE_CHOOSER_DIALOG(
- gtk_builder_get_object(builder, "filechooserdialog"));
+ glade_xml_get_widget(xml, "filechooserdialog"));
+ glade_xml_signal_autoconnect_full(xml, openvrml_player_connect_func, &data);
+
gtk_window_set_transient_for(GTK_WINDOW(data.file_chooser),
GTK_WINDOW(app_window));
- gtk_builder_connect_signals(builder, &data);
-
g_signal_connect(file_chooser_dialog,
"response",
G_CALLBACK(openvrml_player_on_filechooserdialog_response),
@@ -173,42 +196,35 @@
gtk_widget_show_all(app_window);
gtk_main();
-
- error_guard.dismiss();
}
namespace {
- GtkBuilder * builder_new(GnomeProgram & program, GError ** error)
+ GladeXML * xml_new(GnomeProgram & program)
{
using std::string;
- const gchar * const uidir = g_getenv("OPENVRML_PLAYER_UIDIR");
- string ui_file_str;
- const gchar * ui_file = 0;
- if (uidir) {
- ui_file_str = string(uidir) + "/openvrml-player.ui";
- ui_file = ui_file_str.c_str();
+ const gchar * const gladedir = g_getenv("OPENVRML_PLAYER_GLADEDIR");
+ string glade_file_str;
+ const gchar * glade_file = 0;
+ if (gladedir) {
+ glade_file_str = string(gladedir) + "/openvrml-player.glade";
+ glade_file = glade_file_str.c_str();
}
- if (!ui_file) {
+ if (!glade_file) {
static const gboolean only_if_exists = true;
- ui_file =
+ glade_file =
gnome_program_locate_file(&program,
GNOME_FILE_DOMAIN_APP_DATADIR,
- "/ui/openvrml-player.ui",
+ "/glade/openvrml-player.glade",
only_if_exists,
0);
}
- g_return_val_if_fail(ui_file, 0);
+ g_return_val_if_fail(glade_file, 0);
- GtkBuilder * builder = gtk_builder_new();
- if (!gtk_builder_add_from_file(builder, ui_file, error)) {
- return 0;
- }
-
- return builder;
+ return glade_xml_new(glade_file, 0, 0);
}
}
@@ -301,3 +317,57 @@
OPENVRML_PLAYER_CURL_BROWSER_HOST(widget),
static_cast<const char *>(user_data));
}
+
+GtkWidget *
+openvrml_player_build_file_chooser_dialog(GladeXML * /* xml */,
+ GType /* widget_type */,
+ GladeWidgetInfo * /* info */)
+{
+ GtkWidget * widget =
+ GTK_WIDGET(g_object_new(OPENVRML_PLAYER_TYPE_FILE_CHOOSER_DIALOG, 0));
+ return widget;
+}
+
+GtkWidget *
+openvrml_player_build_curl_browser_host(GladeXML * /* xml */,
+ GType /* widget_type */,
+ GladeWidgetInfo * /* info */)
+{
+ GtkWidget * widget =
+ GTK_WIDGET(g_object_new(OPENVRML_PLAYER_TYPE_CURL_BROWSER_HOST, 0));
+ return widget;
+}
+
+void
+openvrml_player_connect_func(const gchar * const handler_name,
+ GObject * const object,
+ const gchar * const signal_name,
+ const gchar * const signal_data,
+ GObject * const connect_object,
+ const gboolean after,
+ const gpointer user_data)
+{
+ static GModule * const this_module = g_module_open(0, GModuleFlags(0));
+ gpointer handler;
+ if (g_module_symbol(this_module, handler_name, &handler)) {
+ if (connect_object) {
+ g_signal_connect_object(
+ object,
+ signal_name,
+ G_CALLBACK(handler),
+ connect_object,
+ GConnectFlags((after ? G_CONNECT_AFTER : 0)
+ | G_CONNECT_SWAPPED));
+ } else {
+ if (after) {
+ g_signal_connect_after(object, signal_name, G_CALLBACK(handler),
+ user_data);
+ } else {
+ g_signal_connect(object, signal_name, G_CALLBACK(handler),
+ user_data);
+ }
+ }
+ } else {
+ g_warning("signal handler \"%s\" not found", handler_name);
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|