kopia lustrzana https://github.com/jamescoxon/dl-fldigi
rodzic
4a0833efab
commit
c9df72646d
|
@ -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))
|
||||
|
|
Ładowanie…
Reference in New Issue