]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/helpview/src/helpview.cpp
Use base class ctors in wxTopLevelWindow.
[wxWidgets.git] / utils / helpview / src / helpview.cpp
index 636f1ed026364a067b22c748273501d8760a71a3..c774b628fac5ccdd546df6f6bc8c98be9c04de50 100644 (file)
@@ -55,9 +55,9 @@ bool hvApp::OnInit()
     delete wxLog::SetActiveTarget(new wxLogStderr); // So dialog boxes aren't used
 #endif
 
-    wxArtProvider::PushProvider(new AlternateArtProvider);
+    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
@@ -152,7 +152,7 @@ bool hvApp::OnInit()
             wxEmptyString,
             wxEmptyString,
             wxT("Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp"),
-            wxOPEN | wxFILE_MUST_EXIST,
+            wxFD_OPEN | wxFD_FILE_MUST_EXIST,
             NULL);
 
         if (!s.empty())
@@ -259,13 +259,13 @@ bool hvApp::OpenBook(wxHtmlHelpController* controller)
         _(
         "Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|\
         HTML Help Project (*.hhp)|*.hhp"),
-        wxOPEN | wxFILE_MUST_EXIST,
+        wxFD_OPEN | wxFD_FILE_MUST_EXIST,
         NULL);
 
     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);
@@ -312,7 +312,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; \
@@ -407,14 +407,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;
@@ -438,10 +436,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
 
@@ -488,18 +488,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