Thread: 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 !
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 >
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 22 July 2003 14:58 > To: Dave Page > Cc: Darko Prenosil; pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] PostgreSQL.hhp > > > Dave Page wrote: > > >Thanks Darko, patch applied. > > > This wipes away the possibility to include different doc > versions using > options!!!!! I still maintain that no-one ever complained about that with pga2. What if the standard html viewer is used if the doc path begins with http:// ? Regards, Dave.
Dave Page wrote: >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")); >> } >>} >> >> >> This wipes away the possibility to include different doc versions using options!!!!!
Dave Page wrote: > > >>-----Original Message----- >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] >>Sent: 22 July 2003 14:58 >>To: Dave Page >>Cc: Darko Prenosil; pgadmin-hackers@postgresql.org >>Subject: Re: [pgadmin-hackers] PostgreSQL.hhp >> >> >>Dave Page wrote: >> >> >> >>>Thanks Darko, patch applied. >>> >>> >>> > > > >>This wipes away the possibility to include different doc >>versions using >>options!!!!! >> >> > >I still maintain that no-one ever complained about that with pga2. > >What if the standard html viewer is used if the doc path begins with >http:// ? > > > We want to have a Beta, don't we? Certainly we can do something like that, sounds like a good idea, but for the moment a working option is broken. And there are enough other problems I believe. Regards, Andreas
----- Original Message ----- From: "Andreas Pflug" <pgadmin@pse-consulting.de> To: "Dave Page" <dpage@vale-housing.co.uk> Cc: "Darko Prenosil" <Darko.Prenosil@finteh.hr>; <pgadmin-hackers@postgresql.org> Sent: Tuesday, July 22, 2003 5:05 PM Subject: Re: [pgadmin-hackers] PostgreSQL.hhp > Dave Page wrote: > > > > > > >>-----Original Message----- > >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > >>Sent: 22 July 2003 14:58 > >>To: Dave Page > >>Cc: Darko Prenosil; pgadmin-hackers@postgresql.org > >>Subject: Re: [pgadmin-hackers] PostgreSQL.hhp > >> > >> > >>Dave Page wrote: > >> > >> > >> > >>>Thanks Darko, patch applied. > >>> > >>> > >>> > > > > > > > >>This wipes away the possibility to include different doc > >>versions using > >>options!!!!! > >> > >> > > > >I still maintain that no-one ever complained about that with pga2. > > > >What if the standard html viewer is used if the doc path begins with > >http:// ? > > > > > > > > We want to have a Beta, don't we? > Certainly we can do something like that, sounds like a good idea, but > for the moment a working option is broken. And there are enough other > problems I believe. > > Regards, > Andreas > Sorry; I wasn't aware of that possibility, but I like Idea to have "searchable" help for PostgreSQL. How about checking: if it is http - call browser and if is not call wxHelpControler ? Or even beter we can simply check if "SQL help site" option points to dir that is subdir of "docPath". In this case only DisplayPgSqlHelp function should be changed. I don't think this is such big change. Shall I do it ? Regards !
Darko Prenosil wrote: >----- Original Message ----- >From: "Andreas Pflug" <pgadmin@pse-consulting.de> >To: "Dave Page" <dpage@vale-housing.co.uk> >Cc: "Darko Prenosil" <Darko.Prenosil@finteh.hr>; ><pgadmin-hackers@postgresql.org> >Sent: Tuesday, July 22, 2003 5:05 PM >Subject: Re: [pgadmin-hackers] PostgreSQL.hhp > > > > >>Dave Page wrote: >> >> >> >>> >>> >>>>-----Original Message----- >>>>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] >>>>Sent: 22 July 2003 14:58 >>>>To: Dave Page >>>>Cc: Darko Prenosil; pgadmin-hackers@postgresql.org >>>>Subject: Re: [pgadmin-hackers] PostgreSQL.hhp >>>> >>>> >>>>Dave Page wrote: >>>> >>>> >>>> >>>> >>>> >>>>>Thanks Darko, patch applied. >>>>> >>>>> >>>>> >>>>> >>>>> >>> >>> >>> >>>>This wipes away the possibility to include different doc >>>>versions using >>>>options!!!!! >>>> >>>> >>>> >>>> >>>I still maintain that no-one ever complained about that with pga2. >>> >>>What if the standard html viewer is used if the doc path begins with >>>http:// ? >>> >>> >>> >>> >>> >>We want to have a Beta, don't we? >>Certainly we can do something like that, sounds like a good idea, but >>for the moment a working option is broken. And there are enough other >>problems I believe. >> >>Regards, >>Andreas >> >> >> >Sorry; I wasn't aware of that possibility, but I like Idea to have >"searchable" help for PostgreSQL. >How about checking: > if it is http - call browser > and if is not call wxHelpControler ? >Or even beter we can simply check if "SQL help site" option points to dir >that is subdir of "docPath". > >In this case only DisplayPgSqlHelp function should be changed. I don't think >this is such big change. Shall I do it ? > > > It's not all. The problem starts at the beginning, having a separate help project/help controller for pgsql. When compiling the pgadmin help project with html workshop, it will include pg as well, so why should there be another project? But this means that the entry point calls will need review. Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 22 July 2003 19:17 > To: Darko Prenosil > Cc: Dave Page; pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] PostgreSQL.hhp > > >Sorry; I wasn't aware of that possibility, but I like Idea to have > >"searchable" help for PostgreSQL. How about checking: > > if it is http - call browser > > and if is not call wxHelpControler ? > >Or even beter we can simply check if "SQL help site" option > points to dir > >that is subdir of "docPath". > > > >In this case only DisplayPgSqlHelp function should be > changed. I don't > >think this is such big change. Shall I do it ? I think that the SQL help site should default to empty. When empty, the HTML Help that we ship will be used. When not, the help will function as previously, using the non-searchable, possible web based help. > > It's not all. The problem starts at the beginning, having a separate > help project/help controller for pgsql. When compiling the > pgadmin help > project with html workshop, it will include pg as well, No it doesn't because there are no links from any of the pgAdmin help to the PostgreSQL help (just tested it). > so why should > there be another project? But this means that the entry point > calls will > need review. There is probably no need for a seperate project I agree. We can easily call the PostgreSQL help directly (or any SQL help for that matter) using wxHtmlHelpController::Display(wxT("pg/index.html")) or something similar. This way we have just one help system for everything, except the PostgreSQL help *if* an alternate source has been selected. Comments? Regards, Dave.
Dave Page wrote: >Comments? > > Yeah. We had feature freeze, didn't we? At this very moment, I won't go into detail about help any furter. I strongly vote for reverting the last patch, and get out the beta-1. If htmlhelp is a problem on some platforms, we simply don't distribute pgadmin3.hhp, and pgadmin3 will smoothly fall back to plain html pages. *After* that, we can discuss all features, and merge the two *.hhp into one. Regards, Andreas
----- Original Message ----- From: "Andreas Pflug" <pgadmin@pse-consulting.de> To: "Darko Prenosil" <Darko.Prenosil@finteh.hr> Cc: "Dave Page" <dpage@vale-housing.co.uk>; <pgadmin-hackers@postgresql.org> Sent: Tuesday, July 22, 2003 8:17 PM Subject: Re: [pgadmin-hackers] PostgreSQL.hhp > Darko Prenosil wrote: > > >----- Original Message ----- > >From: "Andreas Pflug" <pgadmin@pse-consulting.de> > >To: "Dave Page" <dpage@vale-housing.co.uk> > >Cc: "Darko Prenosil" <Darko.Prenosil@finteh.hr>; > ><pgadmin-hackers@postgresql.org> > >Sent: Tuesday, July 22, 2003 5:05 PM > >Subject: Re: [pgadmin-hackers] PostgreSQL.hhp > > > > > > > > > >>Dave Page wrote: > >> > >> > >> > >>> > >>> > >>>>-----Original Message----- > >>>>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > >>>>Sent: 22 July 2003 14:58 > >>>>To: Dave Page > >>>>Cc: Darko Prenosil; pgadmin-hackers@postgresql.org > >>>>Subject: Re: [pgadmin-hackers] PostgreSQL.hhp > >>>> > >>>> > >>>>Dave Page wrote: > >>>> > >>>> > >>>> > >>>> > >>>> > >>>>>Thanks Darko, patch applied. > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>> > >>> > >>> > >>>>This wipes away the possibility to include different doc > >>>>versions using > >>>>options!!!!! > >>>> > >>>> > >>>> > >>>> > >>>I still maintain that no-one ever complained about that with pga2. > >>> > >>>What if the standard html viewer is used if the doc path begins with > >>>http:// ? > >>> > >>> > >>> > >>> > >>> > >>We want to have a Beta, don't we? > >>Certainly we can do something like that, sounds like a good idea, but > >>for the moment a working option is broken. And there are enough other > >>problems I believe. > >> > >>Regards, > >>Andreas > >> > >> > >> > >Sorry; I wasn't aware of that possibility, but I like Idea to have > >"searchable" help for PostgreSQL. > >How about checking: > > if it is http - call browser > > and if is not call wxHelpControler ? > >Or even beter we can simply check if "SQL help site" option points to dir > >that is subdir of "docPath". > > > >In this case only DisplayPgSqlHelp function should be changed. I don't think > >this is such big change. Shall I do it ? > > > > > > > > It's not all. The problem starts at the beginning, having a separate > help project/help controller for pgsql. When compiling the pgadmin help > project with html workshop, it will include pg as well, so why should > there be another project? But this means that the entry point calls will > need review. > I don't se that in the current pgadmin3.hhp. It is missing whole [FILES] section, even start page is not working. Is [FILES] section generated by the Visual C ? I'm using MinGW, so I can't tell. When I manually set [FILES] and compile, everything is O.K. with CHM , but wxHelpControler is not working properly - "search" does not see files under /pg subdir. For example serach for "CREATE TYPE" does not find any matches. With separate pgsql help it would be possible to have last pgadmin version, and version of pgsql docs for example for 7.3.1. It is also big question if win32 builds should call .CHM directly without using wxHelpControler class (windows users are familiar with it, ,can have "favorites" tab, and it is much faster in "search"). I'm not trying to criticize, but figure out what would be the best solution. However, maybe this is not right time to discuss it, because first release is very close. Regards !
Darko, we have FEATURE FREEZE to get a beta! I got several things in the queue myself. We can get back on that stuff for beta-2. Regards, Andreas
Dave Page wrote: > > >>-----Original Message----- >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] >>Sent: 22 July 2003 21:28 >>To: Dave Page >>Cc: Darko Prenosil; pgadmin-hackers@postgresql.org >>Subject: Re: [pgadmin-hackers] PostgreSQL.hhp >> >> >>Dave Page wrote: >> >> >> >>>Comments? >>> >>> >>> >>> >>Yeah. >>We had feature freeze, didn't we? At this very moment, I >>won't go into >>detail about help any furter. >> >> > >This is hardly a new feature, it's bringing all the help into into the >same, already existing format. The current help is inconsistant, >offering search features and navigation for parts, but not others. >Moving it all into the same format not only makes sense, but is the >*right* thing to do from a good design point of view. > >+1 for fixing it. > >Any more opinions out there (I'll need them quickly as I'm going away >tomorrow...)? > > > Hi Dave, so you have plenty of time today to do all the stuff to compile the beta, announce it and additionally discuss the needs for htmlhelp and wait for the implementation?!? This is *not* done in minutes! Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 23 July 2003 08:43 > To: Dave Page > Cc: Darko Prenosil; pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] PostgreSQL.hhp > > > > Hi Dave, > so you have plenty of time today to do all the stuff to compile the > beta, announce it and I already said that beta wasn't going to get done until I get back now having effectively lost Monday (for which I had the whole day put aside)! I need time after tagging etc. to let all the packagers do their bit before we announce and that just isn't going to happen in a few hours. I still haven't fixed the FreeBSD compilation problems either, so currently we're down a whole port unless we roll that back to a much earlier wxWindows. >additionally discuss the needs for htmlhelp and > wait for the implementation?!? Actually I was going to do it myself... Regards, Dave.
Dave Page wrote: > > >>-----Original Message----- >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] >>Sent: 23 July 2003 08:43 >>To: Dave Page >>Cc: Darko Prenosil; pgadmin-hackers@postgresql.org >>Subject: Re: [pgadmin-hackers] PostgreSQL.hhp >> >> >> >>Hi Dave, >>so you have plenty of time today to do all the stuff to compile the >>beta, announce it and >> >> > >I already said that beta wasn't going to get done until I get back now >having effectively lost Monday (for which I had the whole day put >aside)! I need time after tagging etc. to let all the packagers do their >bit before we announce and that just isn't going to happen in a few >hours. I still haven't fixed the FreeBSD compilation problems either, so >currently we're down a whole port unless we roll that back to a much >earlier wxWindows. > > > >>additionally discuss the needs for htmlhelp and >>wait for the implementation?!? >> >> > >Actually I was going to do it myself... > > So do what you must do. I won't touch help until we have beta out. Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 22 July 2003 21:28 > To: Dave Page > Cc: Darko Prenosil; pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] PostgreSQL.hhp > > > Dave Page wrote: > > >Comments? > > > > > > Yeah. > We had feature freeze, didn't we? At this very moment, I > won't go into > detail about help any furter. This is hardly a new feature, it's bringing all the help into into the same, already existing format. The current help is inconsistant, offering search features and navigation for parts, but not others. Moving it all into the same format not only makes sense, but is the *right* thing to do from a good design point of view. +1 for fixing it. Any more opinions out there (I'll need them quickly as I'm going away tomorrow...)? Regards, Dave.
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 23 July 2003 09:43 > To: Dave Page > Cc: Darko Prenosil; pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] PostgreSQL.hhp > > > > So do what you must do. I won't touch help until we have beta out. Riiight. Anywhen in beta is also considered feature freeze, so it istm that now is as good a time as any. Anyway, I've done the coding - it took longer to recompile it on snake than it actually took to write (snake is currently only a PII-333 following (another) mobo failure - Mark will be replacing it soon I hope). If the SQL Help site setting is empty, then all help is pulled from the HTML Help files. If the Help Site is set, then PostgreSQL (not pgAdmin) help is loaded from that location (in the HTML viewer). The bulk of the work was in the hhp/hhc files. I have removed the postgresql specific ones, and merged their contents into the pgAdmin3 ones. I have also been through and sorted out the contents tree which was missing a number of files. This needed to be done regardless. I have also cleaned up some compiler warnings from events.cpp and the QB, and of course tested on Win32 and Slackware. Regards, Dave.
On Wednesday 23 July 2003 13:04, Dave Page wrote: > > -----Original Message----- > > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > > Sent: 23 July 2003 09:43 > > To: Dave Page > > Cc: Darko Prenosil; pgadmin-hackers@postgresql.org > > Subject: Re: [pgadmin-hackers] PostgreSQL.hhp > > > > > > > > So do what you must do. I won't touch help until we have beta out. > > Riiight. Anywhen in beta is also considered feature freeze, so it istm > that now is as good a time as any. > > Anyway, I've done the coding - it took longer to recompile it on snake > than it actually took to write (snake is currently only a PII-333 > following (another) mobo failure - Mark will be replacing it soon I > hope). If the SQL Help site setting is empty, then all help is pulled > from the HTML Help files. If the Help Site is set, then PostgreSQL (not > pgAdmin) help is loaded from that location (in the HTML viewer). > > The bulk of the work was in the hhp/hhc files. I have removed the > postgresql specific ones, and merged their contents into the pgAdmin3 > ones. I have also been through and sorted out the contents tree which > was missing a number of files. This needed to be done regardless. > > I have also cleaned up some compiler warnings from events.cpp and the > QB, and of course tested on Win32 and Slackware. > > Regards, Dave. > I'm glad that my mail wasn't contra-productice after all ! Sorry again, I didn't mean to start the war. My apologies to Andreas too. Regards !
> -----Original Message----- > From: Darko Prenosil [mailto:darko.prenosil@finteh.hr] > Sent: 23 July 2003 15:28 > To: Dave Page; Andreas Pflug > Cc: pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] PostgreSQL.hhp > > > I'm glad that my mail wasn't contra-productice after all ! > Sorry again, I > didn't mean to start the war. My apologies to Andreas too. No war - Andreas and I sometimes just have different opinions and aren't afraid to express them. I for one don't take umm, 'constructive arguments' personally and I sincerely hope that Andreas doesn't either. If anything I think such discussions are good for pgAdmin as it proves we all feel strongly about what we are doing, and not just sitting back and accepting whatever is said. I'm sure someone else has said something very similar (and equally corny) in the past, but together we make pgAdmin stronger :-) Regards, Dave.