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>
</body>
</html>)";
showHelpHtml(this,helpstr,screenPos, wxSize(450,300));
showHelpHtml((wxWindow *)winMain,helpstr,screenPos, wxSize(450,300));
return;
}
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
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);
#endif

View file

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