Applied patch #875647, fixes an unused variable warning reported by Borland; Some minor changes such as tab removal, TRUE/FALSE->true/false.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -58,32 +58,32 @@ bool hvApp::OnInit()
|
|||||||
#ifdef __WXMOTIF__
|
#ifdef __WXMOTIF__
|
||||||
delete wxLog::SetActiveTarget(new wxLogStderr); // So dialog boxes aren't used
|
delete wxLog::SetActiveTarget(new wxLogStderr); // So dialog boxes aren't used
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxArtProvider::PushProvider(new AlternateArtProvider);
|
wxArtProvider::PushProvider(new AlternateArtProvider);
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
wxApp::s_macAboutMenuItemId = wxID_ABOUT;
|
wxApp::s_macAboutMenuItemId = wxID_ABOUT;
|
||||||
wxFileName::MacRegisterDefaultTypeAndCreator( "htb" , 'HTBD' , 'HTBA' ) ;
|
wxFileName::MacRegisterDefaultTypeAndCreator( "htb" , 'HTBD' , 'HTBA' ) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int istyle = wxHF_DEFAULT_STYLE;
|
int istyle = wxHF_DEFAULT_STYLE;
|
||||||
|
|
||||||
wxString service, windowName, book[10], titleFormat, argStr;
|
wxString service, windowName, book[10], titleFormat, argStr;
|
||||||
int bookCount = 0;
|
int bookCount = 0;
|
||||||
int i;
|
int i;
|
||||||
bool hasService = FALSE;
|
bool hasService = false;
|
||||||
bool hasWindowName = FALSE;
|
bool hasWindowName = false;
|
||||||
bool createServer = FALSE;
|
bool createServer = false;
|
||||||
|
|
||||||
#if hvUSE_IPC
|
#if hvUSE_IPC
|
||||||
m_server = NULL;
|
m_server = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Help books are recognized by extension ".hhp" ".htb" or ".zip".
|
// Help books are recognized by extension ".hhp" ".htb" or ".zip".
|
||||||
// Service and window_name can occur anywhere in arguments,
|
// Service and window_name can occur anywhere in arguments,
|
||||||
// but service must be first
|
// but service must be first
|
||||||
// Other arguments (topic?) could be added
|
// Other arguments (topic?) could be added
|
||||||
|
|
||||||
// modes of operation:
|
// modes of operation:
|
||||||
// 1) no arguments - stand alone, prompt user for book
|
// 1) no arguments - stand alone, prompt user for book
|
||||||
// 2) books only - stand alone, open books
|
// 2) books only - stand alone, open books
|
||||||
@@ -92,132 +92,137 @@ bool hvApp::OnInit()
|
|||||||
// 4) at least one argument which is not book, and not "--server" - take first
|
// 4) at least one argument which is not book, and not "--server" - take first
|
||||||
// such argument as service, second (if present) as window name,
|
// such argument as service, second (if present) as window name,
|
||||||
// start service, open any books
|
// start service, open any books
|
||||||
|
|
||||||
for( i=1; i < argc; i++ )
|
for( i=1; i<argc; i++ )
|
||||||
{
|
{
|
||||||
argStr = argv[i];
|
argStr = argv[i];
|
||||||
|
|
||||||
if ( argStr.Find( wxT(".hhp") ) >= 0 ||
|
if ( argStr.Find( wxT(".hhp") ) >= 0
|
||||||
argStr.Find( wxT(".htb") ) >= 0 ||
|
|| argStr.Find( wxT(".htb") ) >= 0
|
||||||
argStr.Find( wxT(".zip") ) >= 0 ) {
|
|| argStr.Find( wxT(".zip") ) >= 0 )
|
||||||
book[bookCount] = argStr;
|
{
|
||||||
bookCount++;
|
book[bookCount] = argStr;
|
||||||
}
|
bookCount++;
|
||||||
else if ( argStr == wxT("--server") )
|
}
|
||||||
{
|
else if ( argStr == wxT("--server") )
|
||||||
createServer = TRUE;
|
{
|
||||||
|
createServer = true;
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
service = wxT("generic_helpservice");
|
service = wxT("generic_helpservice");
|
||||||
#elif defined(__UNIX__)
|
#elif defined(__UNIX__)
|
||||||
service = wxT("/tmp/") + wxString(wxT("generic_helpservice"));
|
service = wxT("/tmp/") + wxString(wxT("generic_helpservice"));
|
||||||
#else
|
#else
|
||||||
service = wxT("4242");
|
service = wxT("4242");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if ( !hasService )
|
else if ( !hasService )
|
||||||
{
|
{
|
||||||
service = argStr;
|
service = argStr;
|
||||||
hasService = TRUE;
|
hasService = true;
|
||||||
createServer = TRUE;
|
createServer = true;
|
||||||
}
|
}
|
||||||
else if ( !hasWindowName )
|
else if ( !hasWindowName )
|
||||||
{
|
{
|
||||||
windowName = argStr;
|
windowName = argStr;
|
||||||
hasWindowName = TRUE;
|
hasWindowName = true;
|
||||||
}
|
}
|
||||||
else if ( argStr.Find( wxT("--Style") ) >= 0 )
|
else if ( argStr.Find( wxT("--Style") ) >= 0 )
|
||||||
{
|
{
|
||||||
long i;
|
long i;
|
||||||
wxString numb = argStr.AfterLast(wxT('e'));
|
wxString numb = argStr.AfterLast(wxT('e'));
|
||||||
if ( !(numb.ToLong(&i) ) )
|
if ( !(numb.ToLong(&i) ) )
|
||||||
{
|
{
|
||||||
wxLogError( wxT("Integer conversion failed for --Style") );
|
wxLogError( wxT("Integer conversion failed for --Style") );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
istyle = i;
|
istyle = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//unknown - could be topic?
|
//unknown - could be topic?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// No book - query user; but not on Mac, since there
|
// No book - query user; but not on Mac, since there
|
||||||
// may be an AppleEvent to open a document on the way
|
// may be an AppleEvent to open a document on the way
|
||||||
#ifndef __WXMAC__
|
#ifndef __WXMAC__
|
||||||
if ( bookCount < 1 )
|
if ( bookCount < 1 )
|
||||||
{
|
{
|
||||||
wxString s = wxFileSelector( wxT("Open help file"),
|
wxString s = wxFileSelector( wxT("Open help file"),
|
||||||
wxGetCwd(),
|
wxGetCwd(),
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
wxT("Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp"),
|
wxT("Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp"),
|
||||||
wxOPEN | wxFILE_MUST_EXIST,
|
wxOPEN | wxFILE_MUST_EXIST,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (!s.IsEmpty())
|
if (!s.IsEmpty())
|
||||||
{
|
{
|
||||||
book[0] = s;
|
book[0] = s;
|
||||||
bookCount = 1;
|
bookCount = 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if hvUSE_IPC
|
|
||||||
|
|
||||||
if ( createServer ) {
|
|
||||||
// Create a new server
|
|
||||||
m_server = new hvServer;
|
|
||||||
|
|
||||||
if ( !m_server->Create(service) ) {
|
|
||||||
wxString wxm = wxT("Server Create failed - service: ");
|
|
||||||
wxString xxm = wxm << service;
|
|
||||||
wxLogError( xxm );
|
|
||||||
//if MSW quits here, probably another copy already exists
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
}
|
|
||||||
createServer = FALSE;
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if hvUSE_IPC
|
||||||
|
|
||||||
|
if ( createServer )
|
||||||
|
{
|
||||||
|
// Create a new server
|
||||||
|
m_server = new hvServer;
|
||||||
|
|
||||||
|
if ( !m_server->Create(service) )
|
||||||
|
{
|
||||||
|
wxString wxm = wxT("Server Create failed - service: ");
|
||||||
|
wxString xxm = wxm << service;
|
||||||
|
wxLogError( xxm );
|
||||||
|
//if MSW quits here, probably another copy already exists
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
createServer = false;
|
||||||
|
wxUnusedVar(createServer);
|
||||||
|
}
|
||||||
|
|
||||||
#endif // hvUSE_IPC
|
#endif // hvUSE_IPC
|
||||||
|
|
||||||
//now add help
|
//now add help
|
||||||
wxInitAllImageHandlers();
|
wxInitAllImageHandlers();
|
||||||
wxFileSystem::AddHandler(new wxZipFSHandler);
|
wxFileSystem::AddHandler(new wxZipFSHandler);
|
||||||
|
|
||||||
SetVendorName(wxT("wxWindows") );
|
SetVendorName(wxT("wxWindows") );
|
||||||
SetAppName(wxT("wxHTMLHelpServer") );
|
SetAppName(wxT("wxHTMLHelpServer") );
|
||||||
wxConfig::Get(); // create an instance
|
wxConfig::Get(); // create an instance
|
||||||
|
|
||||||
m_helpController = new wxHtmlHelpController( istyle );
|
m_helpController = new wxHtmlHelpController( istyle );
|
||||||
|
|
||||||
if ( !hasWindowName )
|
if ( !hasWindowName )
|
||||||
|
{
|
||||||
titleFormat = wxT("Help: %s") ;
|
titleFormat = wxT("Help: %s") ;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//remove underscores
|
//remove underscores
|
||||||
windowName.Replace( wxT("_"), wxT(" ") );
|
windowName.Replace( wxT("_"), wxT(" ") );
|
||||||
titleFormat = windowName;
|
titleFormat = windowName;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_helpController->SetTitleFormat( titleFormat );
|
m_helpController->SetTitleFormat( titleFormat );
|
||||||
|
|
||||||
for( i=0; i < bookCount; i++ )
|
for( i=0; i<bookCount; i++ )
|
||||||
{
|
{
|
||||||
wxFileName fileName(book[i]);
|
wxFileName fileName(book[i]);
|
||||||
m_helpController->AddBook(fileName);
|
m_helpController->AddBook(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WXMOTIF__
|
#ifdef __WXMOTIF__
|
||||||
delete wxLog::SetActiveTarget(new wxLogGui);
|
delete wxLog::SetActiveTarget(new wxLogGui);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_helpController -> DisplayContents();
|
m_helpController->DisplayContents();
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -234,17 +239,17 @@ int hvApp::OnExit()
|
|||||||
node = next;
|
node = next;
|
||||||
}
|
}
|
||||||
m_connections.Clear();
|
m_connections.Clear();
|
||||||
|
|
||||||
if (m_server)
|
if (m_server)
|
||||||
{
|
{
|
||||||
delete m_server;
|
delete m_server;
|
||||||
m_server = NULL;
|
m_server = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
delete m_helpController;
|
delete m_helpController;
|
||||||
delete wxConfig::Set(NULL);
|
delete wxConfig::Set(NULL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,12 +260,12 @@ bool hvApp::OpenBook(wxHtmlHelpController* controller)
|
|||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
_(
|
_(
|
||||||
"Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|\
|
"Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|\
|
||||||
HTML Help Project (*.hhp)|*.hhp"),
|
HTML Help Project (*.hhp)|*.hhp"),
|
||||||
wxOPEN | wxFILE_MUST_EXIST,
|
wxOPEN | wxFILE_MUST_EXIST,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (!s.IsEmpty())
|
if ( !s.empty() )
|
||||||
{
|
{
|
||||||
wxString ext = s.Right(4).Lower();
|
wxString ext = s.Right(4).Lower();
|
||||||
if (ext == _T(".zip") || ext == _T(".htb") || ext == _T(".hhp"))
|
if (ext == _T(".zip") || ext == _T(".htb") || ext == _T(".hhp"))
|
||||||
@@ -268,10 +273,11 @@ bool hvApp::OpenBook(wxHtmlHelpController* controller)
|
|||||||
wxBusyCursor bcur;
|
wxBusyCursor bcur;
|
||||||
wxFileName fileName(s);
|
wxFileName fileName(s);
|
||||||
controller->AddBook(fileName);
|
controller->AddBook(fileName);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
@@ -301,14 +307,14 @@ if ( id == artId ) return wxBitmap(xpmRc##_xpm);
|
|||||||
// Compatibility hack to use wxApp::GetStdIcon of overriden by the user
|
// Compatibility hack to use wxApp::GetStdIcon of overriden by the user
|
||||||
#if WXWIN_COMPATIBILITY_2_2
|
#if WXWIN_COMPATIBILITY_2_2
|
||||||
#define GET_STD_ICON_FROM_APP(iconId) \
|
#define GET_STD_ICON_FROM_APP(iconId) \
|
||||||
if ( client == wxART_MESSAGE_BOX ) \
|
if ( client == wxART_MESSAGE_BOX ) \
|
||||||
{ \
|
{ \
|
||||||
wxIcon icon = wxTheApp->GetStdIcon(iconId); \
|
wxIcon icon = wxTheApp->GetStdIcon(iconId); \
|
||||||
if ( icon.Ok() ) \
|
if ( icon.Ok() ) \
|
||||||
{ \
|
{ \
|
||||||
wxBitmap bmp; \
|
wxBitmap bmp; \
|
||||||
bmp.CopyFromIcon(icon); \
|
bmp.CopyFromIcon(icon); \
|
||||||
return bmp; \
|
return bmp; \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@@ -324,10 +330,10 @@ if ( id == artId ) return wxBitmap(xpmRc##_xpm);
|
|||||||
#else
|
#else
|
||||||
#define CREATE_STD_ICON(iconId, xpmRc) \
|
#define CREATE_STD_ICON(iconId, xpmRc) \
|
||||||
{ \
|
{ \
|
||||||
wxIcon icon(_T(iconId)); \
|
wxIcon icon(_T(iconId)); \
|
||||||
wxBitmap bmp; \
|
wxBitmap bmp; \
|
||||||
bmp.CopyFromIcon(icon); \
|
bmp.CopyFromIcon(icon); \
|
||||||
return bmp; \
|
return bmp; \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -335,8 +341,8 @@ if ( id == artId ) return wxBitmap(xpmRc##_xpm);
|
|||||||
#define ART_MSGBOX(artId, iconId, xpmRc) \
|
#define ART_MSGBOX(artId, iconId, xpmRc) \
|
||||||
if ( id == artId ) \
|
if ( id == artId ) \
|
||||||
{ \
|
{ \
|
||||||
GET_STD_ICON_FROM_APP(iconId) \
|
GET_STD_ICON_FROM_APP(iconId) \
|
||||||
CREATE_STD_ICON(#iconId, xpmRc) \
|
CREATE_STD_ICON(#iconId, xpmRc) \
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
@@ -369,29 +375,29 @@ wxBitmap AlternateArtProvider::CreateBitmap(const wxArtID& id,
|
|||||||
const wxSize& WXUNUSED(size))
|
const wxSize& WXUNUSED(size))
|
||||||
{
|
{
|
||||||
ART(wxART_HELP_SIDE_PANEL, helpsidepanel)
|
ART(wxART_HELP_SIDE_PANEL, helpsidepanel)
|
||||||
ART(wxART_HELP_SETTINGS, helpoptions)
|
ART(wxART_HELP_SETTINGS, helpoptions)
|
||||||
ART(wxART_HELP_BOOK, helpbook)
|
ART(wxART_HELP_BOOK, helpbook)
|
||||||
ART(wxART_HELP_FOLDER, helpbook)
|
ART(wxART_HELP_FOLDER, helpbook)
|
||||||
ART(wxART_HELP_PAGE, helppage)
|
ART(wxART_HELP_PAGE, helppage)
|
||||||
//ART(wxART_ADD_BOOKMARK, addbookm)
|
//ART(wxART_ADD_BOOKMARK, addbookm)
|
||||||
//ART(wxART_DEL_BOOKMARK, delbookm)
|
//ART(wxART_DEL_BOOKMARK, delbookm)
|
||||||
ART(wxART_GO_BACK, helpback)
|
ART(wxART_GO_BACK, helpback)
|
||||||
ART(wxART_GO_FORWARD, helpforward)
|
ART(wxART_GO_FORWARD, helpforward)
|
||||||
ART(wxART_GO_UP, helpup)
|
ART(wxART_GO_UP, helpup)
|
||||||
ART(wxART_GO_DOWN, helpdown)
|
ART(wxART_GO_DOWN, helpdown)
|
||||||
ART(wxART_GO_TO_PARENT, helpuplevel)
|
ART(wxART_GO_TO_PARENT, helpuplevel)
|
||||||
ART(wxART_FILE_OPEN, helpopen)
|
ART(wxART_FILE_OPEN, helpopen)
|
||||||
if (client == wxART_HELP_BROWSER)
|
if (client == wxART_HELP_BROWSER)
|
||||||
{
|
{
|
||||||
//ART(wxART_FRAME_ICON, helpicon)
|
//ART(wxART_FRAME_ICON, helpicon)
|
||||||
ART(wxART_HELP, helpicon)
|
ART(wxART_HELP, helpicon)
|
||||||
}
|
}
|
||||||
|
|
||||||
//ART(wxART_GO_HOME, home)
|
//ART(wxART_GO_HOME, home)
|
||||||
|
|
||||||
// Any wxWindows icons not implemented here
|
// Any wxWindows icons not implemented here
|
||||||
// will be provided by the default art provider.
|
// will be provided by the default art provider.
|
||||||
return wxNullBitmap;
|
return wxNullBitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if hvUSE_IPC
|
#if hvUSE_IPC
|
||||||
@@ -424,26 +430,28 @@ bool hvConnection::OnExecute(const wxString& WXUNUSED(topic),
|
|||||||
int WXUNUSED(size),
|
int WXUNUSED(size),
|
||||||
wxIPCFormat WXUNUSED(format))
|
wxIPCFormat WXUNUSED(format))
|
||||||
{
|
{
|
||||||
// wxLogStatus("Execute command: %s", data);
|
// wxLogStatus("Execute command: %s", data);
|
||||||
|
|
||||||
if ( !wxStrncmp( data, wxT("--intstring"), 11 ) )
|
if ( !wxStrncmp( data, wxT("--intstring"), 11 ) )
|
||||||
{
|
{
|
||||||
long i;
|
long i;
|
||||||
wxString argStr = data;
|
wxString argStr = data;
|
||||||
wxString numb = argStr.AfterLast(wxT('g'));
|
wxString numb = argStr.AfterLast(wxT('g'));
|
||||||
if ( !(numb.ToLong(&i) ) ) {
|
if ( !(numb.ToLong(&i) ) )
|
||||||
wxLogError( wxT("Integer conversion failed for --intstring") );
|
{
|
||||||
}
|
wxLogError( wxT("Integer conversion failed for --intstring") );
|
||||||
else {
|
}
|
||||||
wxGetApp().GetHelpController()->Display(int(i));
|
else
|
||||||
}
|
{
|
||||||
}
|
wxGetApp().GetHelpController()->Display(int(i));
|
||||||
else
|
}
|
||||||
{
|
}
|
||||||
wxGetApp().GetHelpController()->Display(data);
|
else
|
||||||
}
|
{
|
||||||
|
wxGetApp().GetHelpController()->Display(data);
|
||||||
return TRUE;
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hvConnection::OnPoke(const wxString& WXUNUSED(topic),
|
bool hvConnection::OnPoke(const wxString& WXUNUSED(topic),
|
||||||
@@ -452,56 +460,56 @@ bool hvConnection::OnPoke(const wxString& WXUNUSED(topic),
|
|||||||
int WXUNUSED(size),
|
int WXUNUSED(size),
|
||||||
wxIPCFormat WXUNUSED(format))
|
wxIPCFormat WXUNUSED(format))
|
||||||
{
|
{
|
||||||
// wxLogStatus("Poke command: %s = %s", item.c_str(), data);
|
// wxLogStatus("Poke command: %s = %s", item.c_str(), data);
|
||||||
//topic is not tested
|
//topic is not tested
|
||||||
|
|
||||||
if ( wxGetApp().GetHelpController() )
|
if ( wxGetApp().GetHelpController() )
|
||||||
{
|
{
|
||||||
if ( item == wxT("--AddBook") )
|
if ( item == wxT("--AddBook") )
|
||||||
{
|
{
|
||||||
wxGetApp().GetHelpController()->AddBook(data);
|
wxGetApp().GetHelpController()->AddBook(data);
|
||||||
}
|
}
|
||||||
else if ( item == wxT("--DisplayContents") )
|
else if ( item == wxT("--DisplayContents") )
|
||||||
{
|
{
|
||||||
wxGetApp().GetHelpController()->DisplayContents();
|
wxGetApp().GetHelpController()->DisplayContents();
|
||||||
}
|
}
|
||||||
else if ( item == wxT("--DisplayIndex") )
|
else if ( item == wxT("--DisplayIndex") )
|
||||||
{
|
{
|
||||||
wxGetApp().GetHelpController()->DisplayIndex();
|
wxGetApp().GetHelpController()->DisplayIndex();
|
||||||
}
|
}
|
||||||
else if ( item == wxT("--KeywordSearch") )
|
else if ( item == wxT("--KeywordSearch") )
|
||||||
{
|
{
|
||||||
wxGetApp().GetHelpController()->KeywordSearch(data);
|
wxGetApp().GetHelpController()->KeywordSearch(data);
|
||||||
}
|
}
|
||||||
else if ( item == wxT("--SetTitleFormat") )
|
else if ( item == wxT("--SetTitleFormat") )
|
||||||
{
|
{
|
||||||
wxString newname = data;
|
wxString newname = data;
|
||||||
newname.Replace( wxT("_"), wxT(" ") );
|
newname.Replace( wxT("_"), wxT(" ") );
|
||||||
wxGetApp().GetHelpController()->SetTitleFormat(newname);
|
wxGetApp().GetHelpController()->SetTitleFormat(newname);
|
||||||
//does not redraw title bar?
|
//does not redraw title bar?
|
||||||
//wxGetApp().GetHelpController()->ReFresh(); - or something
|
//wxGetApp().GetHelpController()->ReFresh(); - or something
|
||||||
}
|
}
|
||||||
else if ( item == wxT("--SetTempDir") )
|
else if ( item == wxT("--SetTempDir") )
|
||||||
{
|
{
|
||||||
wxGetApp().GetHelpController()->SetTempDir(data);
|
wxGetApp().GetHelpController()->SetTempDir(data);
|
||||||
}
|
}
|
||||||
else if ( item == wxT("--YouAreDead") )
|
else if ( item == wxT("--YouAreDead") )
|
||||||
{
|
{
|
||||||
// don't really know how to kill app from down here...
|
// don't really know how to kill app from down here...
|
||||||
// use wxKill from client instead
|
// use wxKill from client instead
|
||||||
//wxWindow *win = wxTheApp->GetTopWindow();
|
//wxWindow *win = wxTheApp->GetTopWindow();
|
||||||
//if ( win )
|
//if ( win )
|
||||||
// win->Destroy();
|
// win->Destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxChar *hvConnection::OnRequest(const wxString& WXUNUSED(topic),
|
wxChar *hvConnection::OnRequest(const wxString& WXUNUSED(topic),
|
||||||
const wxString& WXUNUSED(item),
|
const wxString& WXUNUSED(item),
|
||||||
int * WXUNUSED(size),
|
int * WXUNUSED(size),
|
||||||
wxIPCFormat WXUNUSED(format))
|
wxIPCFormat WXUNUSED(format))
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -509,8 +517,7 @@ wxChar *hvConnection::OnRequest(const wxString& WXUNUSED(topic),
|
|||||||
bool hvConnection::OnStartAdvise(const wxString& WXUNUSED(topic),
|
bool hvConnection::OnStartAdvise(const wxString& WXUNUSED(topic),
|
||||||
const wxString& WXUNUSED(item))
|
const wxString& WXUNUSED(item))
|
||||||
{
|
{
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // #if hvUSE_IPC
|
||||||
// hvUSE_IPC
|
|
||||||
|
Reference in New Issue
Block a user