X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..89b3361ec25cf1e6d255b14c7633d8375646e4fb:/samples/thread/thread.cpp?ds=sidebyside diff --git a/samples/thread/thread.cpp b/samples/thread/thread.cpp index da8acbdc54..a8529189ed 100644 --- a/samples/thread/thread.cpp +++ b/samples/thread/thread.cpp @@ -6,7 +6,7 @@ // Created: 06/16/98 // RCS-ID: $Id$ // Copyright: (c) 1998-2009 wxWidgets team -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -351,7 +351,7 @@ MyFrame::MyFrame(const wxString& title) { m_oldLogger = wxLog::GetActiveTarget(); - SetIcon(wxIcon(sample_xpm)); + SetIcon(wxICON(sample)); // Make a menubar wxMenuBar *menuBar = new wxMenuBar; @@ -378,7 +378,7 @@ MyFrame::MyFrame(const wxString& title) wxMenu *menuHelp = new wxMenu; menuHelp->Append(THREAD_SHOWCPUS, wxT("&Show CPU count")); menuHelp->AppendSeparator(); - menuHelp->Append(THREAD_ABOUT, wxT("&About...")); + menuHelp->Append(THREAD_ABOUT, wxT("&About")); menuBar->Append(menuHelp, wxT("&Help")); SetMenuBar(menuBar); @@ -479,7 +479,7 @@ MyFrame::DoLogRecord(wxLogLevel level, wxDateTime(info.timestamp).FormatISOTime(), info.threadId == wxThread::GetMainId() ? wxString("main") - : wxString::Format("%x", info.threadId), + : wxString::Format("%lx", info.threadId), msg + "\n" ); } @@ -969,7 +969,7 @@ wxThread::ExitCode MyWorkerThread::Entry() if ( TestDestroy() ) return NULL; - wxThreadEvent event( wxEVT_COMMAND_THREAD, WORKER_EVENT ); + wxThreadEvent event( wxEVT_THREAD, WORKER_EVENT ); event.SetInt( 50 ); wxQueueEvent( m_frame, event.Clone() ); @@ -984,7 +984,7 @@ wxThread::ExitCode MyWorkerThread::Entry() break; // create any type of command event here - wxThreadEvent event( wxEVT_COMMAND_THREAD, WORKER_EVENT ); + wxThreadEvent event( wxEVT_THREAD, WORKER_EVENT ); event.SetInt( m_count ); // send in a thread-safe way @@ -993,7 +993,7 @@ wxThread::ExitCode MyWorkerThread::Entry() wxMilliSleep(200); } - wxThreadEvent event( wxEVT_COMMAND_THREAD, WORKER_EVENT ); + wxThreadEvent event( wxEVT_THREAD, WORKER_EVENT ); event.SetInt(-1); // that's all wxQueueEvent( m_frame, event.Clone() ); #endif @@ -1043,7 +1043,7 @@ wxThread::ExitCode MyGUIThread::Entry() wxMutexGuiLeave(); // notify the dialog that another piece of our masterpiece is complete: - wxThreadEvent event( wxEVT_COMMAND_THREAD, GUITHREAD_EVENT ); + wxThreadEvent event( wxEVT_THREAD, GUITHREAD_EVENT ); event.SetInt(i+1); wxQueueEvent( m_dlg, event.Clone() );