mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 17:30:17 +01:00
Bug1407, better fix: but Timer Record Help dialog is now modal
This commit is contained in:
@@ -100,13 +100,8 @@ void HelpSystem::ShowHtmlText(wxWindow *pParent,
|
||||
{
|
||||
LinkingHtmlWindow *html;
|
||||
|
||||
BrowserFrame * pWnd;
|
||||
if( bModal )
|
||||
pWnd = new HtmlTextHelpDialog();
|
||||
else
|
||||
pWnd = new BrowserFrame();
|
||||
|
||||
pWnd->Create(pParent, wxID_ANY, Title, wxDefaultPosition, wxDefaultSize,
|
||||
auto pFrame = safenew wxFrame {
|
||||
pParent, wxID_ANY, Title, wxDefaultPosition, wxDefaultSize,
|
||||
#if defined(__WXMAC__)
|
||||
// On OSX, the html frame can go behind the help dialog and if the help
|
||||
// html frame is modal, you can't get back to it. Pressing escape gets
|
||||
@@ -115,9 +110,15 @@ void HelpSystem::ShowHtmlText(wxWindow *pParent,
|
||||
// but acceptable in this case.
|
||||
wxSTAY_ON_TOP |
|
||||
#endif
|
||||
wxDEFAULT_FRAME_STYLE);
|
||||
wxDEFAULT_FRAME_STYLE
|
||||
};
|
||||
|
||||
BrowserDialog * pWnd;
|
||||
if( bModal )
|
||||
pWnd = safenew HtmlTextHelpDialog{ pFrame, Title };
|
||||
else
|
||||
pWnd = safenew BrowserDialog{ pFrame, Title };
|
||||
|
||||
pWnd->SetName(pWnd->GetTitle());
|
||||
ShuttleGui S( pWnd, eIsCreating );
|
||||
|
||||
S.SetStyle( wxNO_BORDER | wxTAB_TRAVERSAL );
|
||||
@@ -141,7 +142,7 @@ void HelpSystem::ShowHtmlText(wxWindow *pParent,
|
||||
bIsFile ? wxSize(500, 400) : wxSize(480, 240),
|
||||
wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER);
|
||||
|
||||
html->SetRelatedFrame( pWnd, wxT("Help: %s") );
|
||||
html->SetRelatedFrame( pFrame, wxT("Help: %s") );
|
||||
if( bIsFile )
|
||||
html->LoadFile( HtmlText );
|
||||
else
|
||||
@@ -162,18 +163,22 @@ void HelpSystem::ShowHtmlText(wxWindow *pParent,
|
||||
wxIcon ic{};
|
||||
ic.CopyFromBitmap(theTheme.Bitmap(bmpAudacityLogo48x48));
|
||||
#endif
|
||||
pWnd->SetIcon( ic );
|
||||
pFrame->SetIcon( ic );
|
||||
// -- END of ICON stuff -----
|
||||
|
||||
|
||||
pWnd->mpHtml = html;
|
||||
pWnd->SetBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
|
||||
pWnd->CreateStatusBar();
|
||||
pWnd->Centre();
|
||||
pWnd->Layout();
|
||||
pWnd->Fit();
|
||||
pWnd->SetSizeHints(pWnd->GetSize());
|
||||
pWnd->Show( true );
|
||||
|
||||
pFrame->CreateStatusBar();
|
||||
pFrame->Centre();
|
||||
pFrame->Layout();
|
||||
pFrame->Fit();
|
||||
pFrame->SetSizeHints(pWnd->GetSize());
|
||||
|
||||
pFrame->SetName(Title);
|
||||
pFrame->Show( true );
|
||||
pWnd->ShowModal();
|
||||
|
||||
html->SetRelatedStatusBar( 0 );
|
||||
html->SetFocus();
|
||||
|
||||
Reference in New Issue
Block a user