Re: PostgreSQL.hhp - Mailing list pgadmin-hackers

From Dave Page
Subject Re: PostgreSQL.hhp
Date
Msg-id 03AF4E498C591348A42FC93DEA9661B844B36D@mail.vale-housing.co.uk
Whole thread Raw
In response to PostgreSQL.hhp  ("Darko Prenosil" <Darko.Prenosil@finteh.hr>)
Responses Re: PostgreSQL.hhp  (Andreas Pflug <pgadmin@pse-consulting.de>)
List pgadmin-hackers
Thanks Darko, patch applied.

Regards, Dave.

> -----Original Message-----
> From: Darko Prenosil [mailto:Darko.Prenosil@finteh.hr]
> Sent: 20 July 2003 22:23
> To: pgadmin-hackers@postgresql.org
> Subject: [pgadmin-hackers] PostgreSQL.hhp
>
>
> Now when there is hhp file for PostgreSQL help why not enable
> it in PgAdmin3.
>
> So:
>
> In misc.h add function declaration:
>
> void DisplayPgSqlHelp(wxWindow *wnd, const wxString
> &helpTopic, char **icon=0);
>
> In misc.cpp add function definition:
>
> void DisplayPgSqlHelp(wxWindow *wnd, const wxString
> &helpTopic, char **icon){
>     extern wxString docPath;
>     static wxHtmlHelpController *helpCtl=0;
>     static bool firstCall=true;
>
>     if (firstCall)
>     {
>         firstCall=false;
>         wxString helpfile=docPath + wxT("/") +
> settings->GetCanonicalLanguage() + wxT("/pg/PostgreSQL");
>
>         if (!wxFile::Exists(helpfile + wxT(".hhp")) &&
> !wxFile::Exists(helpfile + wxT(".zip")))
>             helpfile=docPath + wxT("/en_US/pg/PostgreSQL");
>
>         if (wxFile::Exists(helpfile + wxT(".hhp")) ||
> wxFile::Exists(helpfile + wxT(".zip")))
>         {
>             helpCtl=new wxHtmlHelpController();
>             helpCtl->Initialize(helpfile);
>         }
>     }
>
>     if (helpCtl)
>     {
>         if (helpTopic == wxT("index"))
>             helpCtl->DisplayContents();
>         else
>             helpCtl->DisplaySection(helpTopic + wxT(".html"));
>     }
>     else
>     {
>         while (wnd->GetParent())
>             wnd=wnd->GetParent();
>
>         frmHelp::LoadLocalDoc(wnd, helpTopic + wxT(".html"));
>     }
> }
>
> In events.cpp change function definition:
>
> void frmMain::OnPgsqlHelp(wxCommandEvent& event)
> {
>     DisplayPgSqlHelp(this, wxT("index"));
> }
>
>
> And we have Postgresql help available.
>
> I promise I make a patch next time, I forgot to save
> originals, sorry !
>
> Regards !
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
> majordomo@postgresql.org
>

pgadmin-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: Arabic partial delivery
Next
From: "Dave Page"
Date:
Subject: Re: PostgreSQL.hhp