X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1b4b6080913e757f6900b9e0912ab9dab91561a6..65fb4b3a4f18e1d8b58ac92d50d4cc7f81f03783:/samples/sockets/server.cpp diff --git a/samples/sockets/server.cpp b/samples/sockets/server.cpp index 6dcc04eb23..04b4ce33f2 100644 --- a/samples/sockets/server.cpp +++ b/samples/sockets/server.cpp @@ -45,7 +45,9 @@ // -------------------------------------------------------------------------- // the application icon -#include "mondrian.xpm" +#ifndef wxHAS_IMAGES_IN_RESOURCES + #include "../sample.xpm" +#endif // -------------------------------------------------------------------------- // classes @@ -160,9 +162,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; @@ -179,14 +180,14 @@ 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(SERVER_WAITFORACCEPT, "&Wait for connection\tCtrl-W"); m_menuFile->Append(SERVER_UDPTEST, "&UDP test\tCtrl-U"); m_menuFile->AppendSeparator(); - m_menuFile->Append(SERVER_ABOUT, _("&About...\tCtrl-A"), _("Show about dialog")); + m_menuFile->Append(SERVER_ABOUT, _("&About\tCtrl-A"), _("Show about dialog")); m_menuFile->AppendSeparator(); m_menuFile->Append(SERVER_QUIT, _("E&xit\tAlt-X"), _("Quit server")); @@ -216,8 +217,8 @@ MyFrame::MyFrame() : wxFrame((wxFrame *)NULL, wxID_ANY, // Create the socket m_server = new wxSocketServer(addr); - // We use Ok() here to see if the server is really listening - if (! m_server->Ok()) + // We use IsOk() here to see if the server is really listening + if (! m_server->IsOk()) { wxLogMessage("Could not listen at the specified port !"); return;