In another twist, on win 7 if you copy and paste from windows explorer you get a url with the file scheme such as
file:///C:/Users/strabert/Documents/Shared/ma.gpx

This is different from the copy path issue SRE pointed out.

This could be detected and dealt with along the lines of
void MainWindow::inputFileNameEdited()
{
  babelData_.inputFileNames_.clear();
  QString localFile = Qurl(ui_inputFileNameText->text()).toLocalFile();
  if (!localFile.isEmpty()) {
    babelData.inputFileNames_ << localFile;
  } else {
    babelData_.inputFileNames_ << ui_.inputFileNameText->text();
  }
}

Once we have gone this far it seems like maybe we could support the http and https schemes as well which would let users copy links from the web.

Of course all the other issues need to be dealt with as well.  I agree with Robert in that I think the attempt to handle the possibility of multiple files in one QLineEdit widget is difficult, it drags us into system dependent escaping issues and the need for a separator, which could be a character in the file names themselves,  to break the line into files.

Yuck.

On 6/4/2014 12:05 AM, Robert Lipe wrote:
Steve is, as usual, correct.

I'm on vacation and out of the country, but it looks like there are battling forms of cleverness here and they're defeating each other.

MainWindow::dropEvent() _should_ be putting the exact name into inputFileNameText via the setText().  The explicit quoting in MainWindow::browseInputFile() is quite suspicious. We're calling QProcess, not a shell, so we shouldn't be in the business of performing shell quoting to handle whitespace in pathnames. If we're going to support multiple names, we should probably make  inputFileNameText take a QStringList and quit trying to stuff everything into a single quoted string.  Once we do this, MW::applyActionX() probably needs some attention when getName() returns a string array.  

On the other issue, if the output filename isn't an absolute path, we should probably call http://qt-project.org/doc/qt-4.8/qdesktopservices.html#storageLocation to find the Desktop (DOcuments?) directory and then canonicalize that dir + path.


On Wed, Jun 4, 2014 at 12:23 AM, SRE <steve-babel@climber.org> wrote:
At 05:01 PM 6/3/2014, tsteven4 wrote:
>Thanks for pointing out the issues.  However, I am strongly opposed to
>patching up the performance of the windows GUI in the command line
>tool.  I think any necessary fiddling should be done in the GUI itself.

Strongly agree! Just don't know where to look...

Sort of surprised the routines underlying the GUI aren't automatically
making these sorts of corrections/edits. Maybe there's a mode switch?

Steve



------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code