----- Original Message ----- > From: Wayne Stambaugh <[email protected]> > To: [email protected] > Cc: > Sent: Friday, March 7, 2014 8:45 AM > Subject: Re: [Kicad-developers] Gerber files opened from main app GUI > > On 3/4/2014 1:44 PM, Nick Østergaard wrote: >> I would like to get some answers to Cirilo's quesitons. I have >> successfully been using the attached patch, just to make the kicad app >> render the icons and open correctly for all gerber files in the tree. >> >> Nick >> >> >> 2014-01-11 3:53 GMT+01:00 Cirilo Bernardo <[email protected] >> <mailto:[email protected]>>: >> >> I've been looking into the issue of the main kicad GUI not >> associating GB?, GT? files with Gerbview and I have a few >> observations and questions: >> >> 1. the string GerberFileExtension is currently defined in >> common/wildcards_and_files_ext.cpp but it is only used in the kicad >> main app. >> >> 2. likewise, GerberFileWildCard is defined in the same file and only >> used in the main app. >> >> 3. in >> kicad/tree_project_frame.{cpp,h}, > TREE_PROJECT_FRAME::GetFileWildcard does >> not appear to be used anywhere in the KiCad tree. >> >> >> My questions: >> >> 1. Current definition of GerberFileExtension is: >> >> const wxString GerberFileExtension( wxT( "pho" ) ); >> >> If I change it to this line: >> >> const wxString GerberFileExtension( wxT( >> ".((gbr|(gb|gt)[alops])|pho)" ) ); >> >> then the kicad main app correctly associates the various gerber file >> extensions with gerbview. >> Is is a good idea to make this change? After all, only >> TREE_PROJECT_FRAME in kicad/ makes use of it. >> >> 1b. The leading '.' in the string is essential since the string > is >> used to form a regexp by adding it to a regexp string beginning with >> "^.*\" In fact, I wonder if the regexp part (line 497 of >> tree_project_frame.cpp): >> >> reg.Compile( wxString::FromAscii( "^.*\\" > ) + ext + >> wxString::FromAscii( "$" ), > wxRE_ICASE ); >> >> should actually be: >> >> reg.Compile( wxString::FromAscii( > "^.*\\." ) + ext + >> wxString::FromAscii( "$" ), > wxRE_ICASE ); >> >> This way we are assured that there is a '.' before the > extension. >> Any comments? >> >> >> 2. Since no other app makes use >> of GerberFileExtension/GerberFileWildCard, should we simply move >> these definitions to tree_project_frame.cpp ? >> >> >> 3. Is TREE_PROJECT_FRAME::GetFileWildcard cruft which can be removed >> or is it part of code in development? >> >> Cheers, >> Cirilo >> > > Patch committed in product branch revision r4736. Thanks Cirilo. > >
No problem. Thanks for having a look at it and committing the fix. - Cirilo _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

