X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/20c81bed846981e90769826b94a91eebb91158f1..8f96683438e5b588caafecc442bba6a2da801e17:/utils/helpview/src/helpview.cpp diff --git a/utils/helpview/src/helpview.cpp b/utils/helpview/src/helpview.cpp index 68991f7467..4b445e0065 100644 --- a/utils/helpview/src/helpview.cpp +++ b/utils/helpview/src/helpview.cpp @@ -5,7 +5,6 @@ // Author: Vaclav Slavik, Julian Smart // Modified by: // Created: 2002-07-09 -// RCS-ID: $Id$ // Copyright: (c) 2002 Vaclav Slavik, Julian Smart and others // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -57,7 +56,7 @@ bool hvApp::OnInit() wxArtProvider::Push(new AlternateArtProvider); -#ifdef __WXMAC__ +#if defined( __WXOSX_MAC__ ) && wxOSX_USE_CARBON wxApp::s_macAboutMenuItemId = wxID_ABOUT; wxFileName::MacRegisterDefaultTypeAndCreator( wxT("htb") , 'HTBD' , 'HTBA' ) ; #endif @@ -219,8 +218,6 @@ bool hvApp::OnInit() m_helpController->DisplayContents(); - SetTopWindow(m_helpController->GetFrame()); - return true; } @@ -267,7 +264,7 @@ bool hvApp::OpenBook(wxHtmlHelpController* controller) if ( !s.empty() ) { wxString ext = s.Right(4).Lower(); - if (ext == _T(".zip") || ext == _T(".htb") || ext == _T(".hhp")) + if (ext == wxT(".zip") || ext == wxT(".htb") || ext == wxT(".hhp")) { wxBusyCursor bcur; wxFileName fileName(s); @@ -281,10 +278,10 @@ bool hvApp::OpenBook(wxHtmlHelpController* controller) #ifdef __WXMAC__ /// Respond to Apple Event for opening a document -void hvApp::MacOpenFile(const wxString& filename) +void hvApp::MacOpenFiles(const wxArrayString& fileNames) { wxBusyCursor bcur; - wxFileName fileName(filename); + wxFileName fileName(fileNames[0]); m_helpController->AddBook(fileName); m_helpController->DisplayContents(); } @@ -314,7 +311,7 @@ if ( id == artId ) return wxBitmap(xpmRc##_xpm); #else #define CREATE_STD_ICON(iconId, xpmRc) \ { \ - wxIcon icon(_T(iconId)); \ + wxIcon icon(wxT(iconId)); \ wxBitmap bmp; \ bmp.CopyFromIcon(icon); \ return bmp; \ @@ -409,14 +406,12 @@ hvConnection::~hvConnection() wxGetApp().GetConnections().DeleteObject(this); } -bool hvConnection::OnExecute(const wxString& WXUNUSED(topic), - wxChar *data, - int WXUNUSED(size), - wxIPCFormat WXUNUSED(format)) +bool hvConnection::OnExec(const wxString& WXUNUSED(topic), + const wxString& data) { // wxLogStatus("Execute command: %s", data); - if ( !wxStrncmp( data, wxT("--intstring"), 11 ) ) + if ( data == "--intstring" ) { long i; wxString argStr = data; @@ -440,10 +435,12 @@ bool hvConnection::OnExecute(const wxString& WXUNUSED(topic), bool hvConnection::OnPoke(const wxString& WXUNUSED(topic), const wxString& item, - wxChar *data, - int WXUNUSED(size), - wxIPCFormat WXUNUSED(format)) + const void *buf, + size_t size, + wxIPCFormat format) { + const wxString data = GetTextFromData(buf, size, format); + // wxLogStatus("Poke command: %s = %s", item.c_str(), data); //topic is not tested @@ -490,18 +487,4 @@ bool hvConnection::OnPoke(const wxString& WXUNUSED(topic), return true; } -wxChar *hvConnection::OnRequest(const wxString& WXUNUSED(topic), - const wxString& WXUNUSED(item), - int * WXUNUSED(size), - wxIPCFormat WXUNUSED(format)) -{ - return NULL; -} - -bool hvConnection::OnStartAdvise(const wxString& WXUNUSED(topic), - const wxString& WXUNUSED(item)) -{ - return true; -} - #endif // #if wxUSE_IPC