From c9df72646d35c894029bb19da04fd83fc9045a4f Mon Sep 17 00:00:00 2001 From: David Freese Date: Sat, 25 Feb 2012 17:46:29 -0600 Subject: [PATCH] MFSK pic dnd * Fix drag-n-drop of file onto MFSK transmit pic dialog --- src/widgets/picture.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/widgets/picture.cxx b/src/widgets/picture.cxx index 802892a5..aa5b4f92 100644 --- a/src/widgets/picture.cxx +++ b/src/widgets/picture.cxx @@ -675,11 +675,14 @@ int picbox::handle(int event) // handle FL_PASTE string text = Fl::event_text(); +// from dnd event "file:///home/dave/Photos/dave.jpeg" string::size_type p; if ((p = text.find("file://")) != string::npos) text.erase(0, p + strlen("file://")); if ((p = text.find('\r')) != string::npos) text.erase(p); + if ((p = text.find('\n')) != string::npos) + text.erase(p); struct stat st; if (stat(text.c_str(), &st) == -1 || !S_ISREG(st.st_mode))