From: Braden M. <br...@us...> - 2007-02-06 08:23:00
|
Update of /cvsroot/openvrml/openvrml/src/openvrml-player In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4677/src/openvrml-player Modified Files: openvrml-player.glade player.cpp Log Message: Load worlds from the location bar. Index: player.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/openvrml-player/player.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** player.cpp 6 Feb 2007 04:47:47 -0000 1.6 --- player.cpp 6 Feb 2007 08:22:58 -0000 1.7 *************** *** 1,5 **** // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 78 -*- // ! // Copyright 2006 Braden McDaniel // // This program is free software; you can redistribute it and/or modify --- 1,5 ---- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 78 -*- // ! // Copyright 2006, 2007 Braden McDaniel // // This program is free software; you can redistribute it and/or modify *************** *** 54,57 **** --- 54,58 ---- void * stream); void openvrml_player_on_about_activated(GtkWindow * window); + void openvrml_player_on_locationentry_activated(GtkEntry * entry); void openvrml_player_on_filechooserdialog_file_activated( GtkFileChooser * chooser, *************** *** 108,117 **** if (!gnome_vfs_init()) { ! g_printerr("GnomeVFS initialization failed"); return EXIT_FAILURE; } if (curl_global_init(CURL_GLOBAL_ALL) != 0) { ! g_printerr("libcurl initialization failed"); return EXIT_FAILURE; } --- 109,118 ---- if (!gnome_vfs_init()) { ! g_critical("GnomeVFS initialization failed"); return EXIT_FAILURE; } if (curl_global_init(CURL_GLOBAL_ALL) != 0) { ! g_critical("libcurl initialization failed"); return EXIT_FAILURE; } *************** *** 748,751 **** --- 749,760 ---- } + void openvrml_player_on_locationentry_activated(GtkEntry * const entry) + { + const gchar * const uri = gtk_entry_get_text(entry); + std::ostringstream command; + command << "load-url " << uri << std::endl; + ::write_command(command.str()); + } + void openvrml_player_on_filechooserdialog_file_activated( *************** *** 771,775 **** if (status != G_IO_STATUS_NORMAL) { if (error) { ! g_printerr(error->message); g_error_free(error); } --- 780,784 ---- if (status != G_IO_STATUS_NORMAL) { if (error) { ! g_critical(error->message); g_error_free(error); } *************** *** 781,785 **** if (status != G_IO_STATUS_NORMAL) { if (error) { ! g_printerr(error->message); g_error_free(error); } --- 790,794 ---- if (status != G_IO_STATUS_NORMAL) { if (error) { ! g_critical(error->message); g_error_free(error); } *************** *** 811,815 **** if (status != G_IO_STATUS_NORMAL) { if (error) { ! g_printerr(error->message); g_error_free(error); } --- 820,824 ---- if (status != G_IO_STATUS_NORMAL) { if (error) { ! g_critical(error->message); g_error_free(error); } *************** *** 823,827 **** if (status != G_IO_STATUS_NORMAL) { if (error) { ! g_printerr(error->message); g_error_free(error); } --- 832,836 ---- if (status != G_IO_STATUS_NORMAL) { if (error) { ! g_critical(error->message); g_error_free(error); } Index: openvrml-player.glade =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/openvrml-player/openvrml-player.glade,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** openvrml-player.glade 23 Jan 2007 10:06:19 -0000 1.2 --- openvrml-player.glade 6 Feb 2007 08:22:58 -0000 1.3 *************** *** 77,82 **** <property name="visible">True</property> <child> ! <widget class="GtkEntry" id="entry1"> <property name="visible">True</property> </widget> </child> --- 77,83 ---- <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> *************** *** 90,93 **** --- 91,96 ---- <widget class="GtkSocket" id="socket"> <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="has-focus">True</property> </widget> </child> |