X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c801d85f158c4cba50b588807daabdcbd0ed3853..bcd3d8d9e26e41615d26d457ba0e2b84b80a0356:/src/generic/helpxlp.cpp diff --git a/src/generic/helpxlp.cpp b/src/generic/helpxlp.cpp index 0631f6d80a..7fd06788fd 100644 --- a/src/generic/helpxlp.cpp +++ b/src/generic/helpxlp.cpp @@ -6,7 +6,7 @@ // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -25,8 +25,10 @@ #endif #include "wx/generic/helpxlp.h" +#include "wx/intl.h" +#include "wx/msgdlg.h" -#if USE_HELP +#if wxUSE_HELP #include #ifdef __X__ @@ -53,9 +55,8 @@ #include "wx/generic/helpxlp.h" -#if !USE_SHARED_LIBRARY -#ifdef __WINDOWS__ +#ifdef __WXMSW__ IMPLEMENT_CLASS(wxXLPHelpClient, wxDDEClient) IMPLEMENT_CLASS(wxXLPHelpConnection, wxDDEConnection) #else @@ -64,15 +65,23 @@ IMPLEMENT_CLASS(wxXLPHelpConnection, wxTCPConnection) #endif IMPLEMENT_CLASS(wxXLPHelpController, wxHelpControllerBase) -#endif -wxXLPHelpController::wxXLPHelpController(void): - helpClient(this) +// suppress annoying warning "'this' used in base member init list" (so what?) +#ifdef __VISUALC__ + #pragma warning(disable: 4355) +#endif // Visual C++ + +wxXLPHelpController::wxXLPHelpController(void) + : helpClient(this) { helpFile = ""; helpServer = -1; helpHost = ""; helpRunning = FALSE; helpConnection = NULL; } +#ifdef __VISUALC__ + #pragma warning(default: 4355) +#endif // Visual C++ + wxXLPHelpController::~wxXLPHelpController(void) { } @@ -88,7 +97,6 @@ bool wxXLPHelpController::Initialize(const wxString& filename, int server) helpFile = filename; helpServer = server; - wxIPCInitialize(); return TRUE; } @@ -110,21 +118,21 @@ bool wxXLPHelpController::LoadFile(const wxString& file) bool wxXLPHelpController::DisplayContents(void) { - if (!helpRunning) - { + if (!helpRunning) + { if (!Run()) return FALSE; } if (helpConnection) - return helpConnection->Execute("s -1"); + return helpConnection->Execute("s -1"); else - return FALSE; + return FALSE; } bool wxXLPHelpController::DisplaySection(int section) { if (!helpRunning) - { + { if (!Run()) return FALSE; } @@ -138,7 +146,7 @@ bool wxXLPHelpController::DisplaySection(int section) bool wxXLPHelpController::DisplayBlock(long block) { if (!helpRunning) - { + { if (!Run()) return FALSE; } @@ -152,7 +160,7 @@ bool wxXLPHelpController::DisplayBlock(long block) bool wxXLPHelpController::KeywordSearch(const wxString& k) { if (!helpRunning) - { + { if (!Run()) return FALSE; } @@ -180,7 +188,7 @@ bool wxXLPHelpController::Run(void) if (!helpFile || !helpHost || helpRunning) return FALSE; #endif -#ifdef __WINDOWS__ +#ifdef __WXMSW__ if (!helpFile || helpRunning) return FALSE; #endif @@ -199,7 +207,7 @@ bool wxXLPHelpController::Run(void) char server[32]; sprintf(server, "%d", helpServer); -#ifdef __WINDOWS__ +#ifdef __WXMSW__ // Only one instance of wxHelp under Windows. // See if there's already an instance of wxHelp if ((helpConnection = (wxXLPHelpConnection *)helpClient.MakeConnection(helpHost, server, "WXHELP"))) @@ -254,4 +262,4 @@ bool wxXLPHelpConnection::OnDisconnect(void) return TRUE; } -#endif // USE_HELP +#endif // wxUSE_HELP