Fabrizio, I committed a modified version of your patch to fix this. Thank you for your contribution to KiCad.
Cheers, Wayne On 6/7/2017 10:50 AM, Fabrizio Tappero wrote: > Hi guys > > the following patch fix the problem of detecting the default PDF viewer > and use it to open PDF files (under Linux Debian) in the kicad main > window when you double click on a PDF doc. > > It would be great to test it under windows and OSX. > > cheers > Fabrizio > > > > > > From b3aa02b874476ae9f25311b4525e03b635091ed1 Mon Sep 17 00:00:00 2001 > From: Fabrizio Tappero <[email protected] > <mailto:[email protected]>> > Date: Wed, 7 Jun 2017 16:43:16 +0200 > Subject: [PATCH] default pdf reader is now properly detected unider Linux > > --- > common/gestfich.cpp | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/common/gestfich.cpp b/common/gestfich.cpp > index 3a09576..b68ec68 100644 > --- a/common/gestfich.cpp > +++ b/common/gestfich.cpp > @@ -344,7 +344,7 @@ wxString KicadDatasPath() > > bool OpenPDF( const wxString& file ) > { > - wxString command; > + wxString command = ""; > wxString filename = file; > > Pgm().ReadPdfBrowserInfos(); > @@ -356,12 +356,9 @@ bool OpenPDF( const wxString& file ) > } > else > { > - wxFileType* filetype = > wxTheMimeTypesManager->GetFileTypeFromExtension( wxT( "pdf" ) ); > - > - if( filetype ) > - command = filetype->GetOpenCommand( filename ); > - > - delete filetype; > + AddDelimiterString( filename ); > + wxLaunchDefaultApplication( filename ); > + return true; > } > > if( !command.IsEmpty() ) > -- > 2.7.4 > > > > _______________________________________________ > 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

