Add help for options pgadmin3opt.Press Ctrl+F1

This commit is contained in:
lsv 2026-03-03 10:18:09 +05:00
parent c1b222ee43
commit e54809faf2
3 changed files with 12 additions and 6 deletions

View file

@ -71,7 +71,7 @@ void ctlTreeJSON::OnChar(wxKeyEvent& event) {
<p><b>Ctrl-Z</b> - Return source context node.</p> <p><b>Ctrl-Z</b> - Return source context node.</p>
</body> </body>
</html>)"; </html>)";
showHelpHtml(this,helpstr,screenPos, wxSize(450,300)); showHelpHtml((wxWindow *)winMain,helpstr,screenPos, wxSize(450,300));
return; return;
} }
if (event.GetKeyCode() == WXK_CONTROL_F) { if (event.GetKeyCode() == WXK_CONTROL_F) {

View file

@ -280,6 +280,7 @@ wxString qtIdent(const wxString &value); // add " if necessary
wxString qtTypeIdent(const wxString &value); // add " if necessary wxString qtTypeIdent(const wxString &value); // add " if necessary
bool make_identifier(const wxString &strname, wxString &s, wxString &n, bool islower); bool make_identifier(const wxString &strname, wxString &s, wxString &n, bool islower);
wxSize getScreenSizeForPoint(const wxPoint screenPos);
void showHelpHtml(wxWindow *parent, const wxString &htmlHelp,wxPoint screenPos, wxSize size); void showHelpHtml(wxWindow *parent, const wxString &htmlHelp,wxPoint screenPos, wxSize size);
#endif #endif

View file

@ -1484,10 +1484,8 @@ bool make_identifier(const wxString &strname, wxString &s, wxString &n, bool isl
return true; return true;
} }
//show help window // Get display for ScreenPoint
void showHelpHtml(wxWindow *parent, const wxString &htmlHelp,wxPoint screenPos, wxSize size) { wxSize getScreenSizeForPoint(const wxPoint screenPos) {
FunctionPGHelper fh(htmlHelp);
wxString key = "content";
// screen size // screen size
wxPoint posScreen; wxPoint posScreen;
wxSize sizeScreen; wxSize sizeScreen;
@ -1504,7 +1502,14 @@ void showHelpHtml(wxWindow *parent, const wxString &htmlHelp,wxPoint screenPos,
posScreen = wxPoint(0, 0); posScreen = wxPoint(0, 0);
sizeScreen = wxGetDisplaySize(); sizeScreen = wxGetDisplaySize();
} }
return sizeScreen;
}
//show help window
void showHelpHtml(wxWindow *parent, const wxString &htmlHelp,wxPoint screenPos, wxSize size) {
FunctionPGHelper fh(htmlHelp);
wxString key = "content";
wxSize sizeScreen=getScreenSizeForPoint(screenPos);
wxSize rr(350, 70); wxSize rr(350, 70);
if (size.x!=-1) rr=size; if (size.x!=-1) rr=size;
popuphelp *m_Popup = new popuphelp(parent, key, &fh, screenPos, rr); popuphelp *m_Popup = new popuphelp(parent, key, &fh, screenPos, rr);
@ -1526,7 +1531,7 @@ void showHelpHtml(wxWindow *parent, const wxString &htmlHelp,wxPoint screenPos,
wxRect r = m_Popup->GetScreenRect(); wxRect r = m_Popup->GetScreenRect();
m_Popup->Popup(); m_Popup->Popup();
} }
//m_Popup->SetFocus();
} }