X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b2f747d8f9f2c4fed617e5ff22a719bfd45259f8..eb6b14dc71402c42e0474779bfcd6e878383071e:/samples/sockets/client.cpp?ds=inline diff --git a/samples/sockets/client.cpp b/samples/sockets/client.cpp index fe33b6bd89..23ccaafab3 100644 --- a/samples/sockets/client.cpp +++ b/samples/sockets/client.cpp @@ -4,7 +4,6 @@ // Author: Guillermo Rodriguez Garcia // Modified by: // Created: 1999/09/19 -// RCS-ID: $Id$ // Copyright: (c) 1999 Guillermo Rodriguez Garcia // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -39,7 +38,9 @@ // -------------------------------------------------------------------------- // the application icon -#include "mondrian.xpm" +#ifndef wxHAS_IMAGES_IN_RESOURCES + #include "../sample.xpm" +#endif // -------------------------------------------------------------------------- // classes @@ -188,9 +189,8 @@ bool MyApp::OnInit() // Create the main application window MyFrame *frame = new MyFrame(); - // Show it and tell the application that it's our main window + // Show it frame->Show(true); - SetTopWindow(frame); // success return true; @@ -206,11 +206,11 @@ MyFrame::MyFrame() : wxFrame((wxFrame *)NULL, wxID_ANY, wxDefaultPosition, wxSize(300, 200)) { // Give the frame an icon - SetIcon(wxICON(mondrian)); + SetIcon(wxICON(sample)); // Make menus m_menuFile = new wxMenu(); - m_menuFile->Append(CLIENT_ABOUT, _("&About...\tCtrl-A"), _("Show about dialog")); + m_menuFile->Append(CLIENT_ABOUT, _("&About\tCtrl-A"), _("Show about dialog")); m_menuFile->AppendSeparator(); m_menuFile->Append(CLIENT_QUIT, _("E&xit\tAlt-X"), _("Quit client")); @@ -611,14 +611,16 @@ void MyFrame::OnTestURL(wxCommandEvent& WXUNUSED(event)) } // Print the contents type and file size - wxLogMessage("Contents type: %s\nFile size: %i\nStarting to download...", + wxLogMessage("Contents type: %s\nFile size: %lu\nStarting to download...", url.GetProtocol().GetContentType(), - data->GetSize()); + static_cast( data->GetSize() )); // Get the data wxStringOutputStream sout; if ( data->Read(sout).GetLastError() != wxSTREAM_EOF ) + { wxLogError("Error reading the input stream."); + } wxLogMessage("Text retrieved from URL \"%s\" follows:\n%s", urlname, sout.GetString());