Opened 14 years ago

Closed 14 years ago

#465 closed Bug (fixed)

Handle drag and drop properly

Reported by: berkut Owned by: livings124
Priority: Normal Milestone: None Set
Component: Mac Client Version: 0.92
Severity: Normal Keywords:
Cc: nox@…

Description

Currently, Transmission starts processing files that are being dragged in the draggingEntered: method, which is wrong - this means Transmission starts processing files even if files are dragged over its interface and not dropped on it - i.e. destined for another application. It then either does nothing or crashes (the latter seems to be if it's a big file).

I can't open and compile the latest code (still on Tiger), but looking at performDragOperation:, it seems like that code's fine and will handle stuff fine for triggering the actual drop successfully so I think all that's needed is to remove the processing stuff from draggingEntered: and only do visual interface stuff there - focus border, etc.

Change History (5)

comment:1 Changed 14 years ago by livings124

  • Resolution set to invalid
  • Status changed from new to closed

It has to process the torrent to display the overlay info on it.

comment:2 Changed 14 years ago by berkut

  • Resolution invalid deleted
  • Status changed from closed to reopened

???!!! At the very least, check it's got a .torrent extension - although that doesn't prove much, but it will stop it trying to open .avi files like it currently does.

I'm not trying to be awkward, but do you think it's acceptable for a program to process files that are simply dragged over it without being dropped?

comment:3 Changed 14 years ago by livings124

  • Resolution set to wontfix
  • Status changed from reopened to closed

If you want to submit a patch to delay by a second before it check, as another ticket requests, be my guest. But the behavior done now is the desired behavior.

comment:4 Changed 14 years ago by nox

  • Cc nox@… added
  • Resolution wontfix deleted
  • Status changed from closed to reopened

The problem indeed comes from Controller draggingEntered: which calls tr_torrentParse() on every file dragged onto the window. This function then calls tr_loadFile() which results in a malloc() of the filesize. How can you say that's the intended behaviour? What if I drag onto Transmission a 4GB dmg file?

That's definitively a bug.

comment:5 Changed 14 years ago by livings124

  • Resolution set to fixed
  • Status changed from reopened to closed

It now checks if it has the .torrent file extension, so large file size shouldn't be an issue.

Note: See TracTickets for help on using tickets.