Hi, It's a good idea to setup an URL like: http://docs.kicad-pcb.org/. I don't know who has webserver / DNS access besides ajo? .htacess is not that hard.
You can either use the base_name directly. Or change other parts in the code, so I can use for example: event.GetId() == wxID_BLAH or event.GetMenuItem() == wxMenuItem_BLAH. Then you can still use a switch without hashmap. Well it's about how complicated you want the code, for opening the online docs. Kind regards, Melroy van den Berg 2015-05-18 18:40 GMT+02:00 Nick Østergaard <[email protected]>: > 2015-05-18 18:35 GMT+02:00 Melroy van den Berg <[email protected]>: > > Hi Nick and Blair, > > > > @Nick > > I choose for a separate wxString to explicitly make a difference between > a > > local file & online URL. However, yes you can merge them together using 1 > > xwString. > > If you want, you can change it to your own taste > > > > @Blair > > Thanks for your reply. The first remark I agree, but the current > > documentation also lacks behind, so it already doesn't match the current > > installed KiCad version ;) > > About the second remark, this you can easily solve in the code. > > > > But for now, my patch only ensures that it opens the online documentation > > when no doc-package is installed or can be found. > > In my minds it would not be that great to include the patch as is. > Firstly it uses the Jenkins URL directly, which is likely subject to > change when we get the cmake stuff included with the docs. > > What I would like to see is that we get some more generic and nicer > url redirects setup, such as http://docs.kicad-pcb.org/pcbnew. Ajo > has expressed his support on IRC, but is busy at the moment. > > By doing this we could get away of the hashmap stuff and just use the > base_name directly to construct the url. I would like other peoples > opinion on this approach. > > > Hopefully this patch will get delivered soon :)! > > Thx. > > > > Kind regards, > > Melroy van den Berg > > > > 2015-05-18 7:31 GMT+02:00 Nick Østergaard <[email protected]>: > >> > >> 2015-05-18 0:44 GMT+02:00 Melroy van den Berg <[email protected] > >: > >> > Hi devs, > >> > > >> > I created a patch which opens the online documentation page in the > >> > web-browser, only when the local help file could not be found. > >> > > >> > This way the user don't get the pop-up message: 'PDF could not be > >> > found'. > >> > Instead they can read the latest successfully build documentation > online > >> > :). > >> > > >> > Off-topic: > >> >> > >> >> It would be nice if online documentation becomes the default. > >> >> This way the users always read the latest version of the > documentation. > >> > > >> > > >> > See attachment for the patch. > >> > >> Why do you do the: > >> if( !helpFile ) > >> { > >> ... helpURL = ... > >> } > >> else > >> { > >> GetAssociatedDocument( this, helpFile ); > >> if(!helpURL.IsEmpty()) > >> { > >> GetAssociatedDocument( this, helpURL ); > >> } > >> > >> Why not just > >> > >> if( !helpFile ) > >> { > >> ... > >> helpFile = ... > >> } > >> GetAssociatedDocument( this, helpFile ); > >> > >> By that it will just set the helpFile if the helpfile was not found. > >> > >> > Thanks in advance! > >> > > >> > Kind regards, > >> > Melroy van den Berg > > > > > > > > > > _______________________________________________ > > Mailing list: https://launchpad.net/~kicad-developers > > Post to : [email protected] > > Unsubscribe : https://launchpad.net/~kicad-developers > > More help : https://help.launchpad.net/ListHelp > > >
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

