can't drag'n'drop onto an unsaved file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Scratch |
Fix Released
|
Medium
|
SuperScript |
Bug Description
This bug has been split from https:/
When a file is deleted while being edited, an infobar is shown and the SourceView is set to non-editable. This leads to Scratch rejecting the open file drag'n'drop interaction.
To reproduce:
1. open any file
2. delete or rename that file so the yellow "file missing" infobar shows
3. try to drag'n'drop a file into Scratch
the file will be rejected and revert
The problem originates in the code that shows the infobar and sets the SourceView to read-only. Gtk won't allow the reception of drag'n'drop events on a read-only object. Reading around on the web, one needs to listen for the drag-start hook and set the object to read-write, then when the drag leaves or a file is dropped, set it back to read-only. This will be a pretty complicated job.
Related branches
- Danielle Foré: Approve
- Artem Anufrij (community): Approve (code style)
-
Diff: 37 lines (+7/-1)1 file modifiedsrc/Widgets/DocumentView.vala (+7/-1)
Changed in scratch: | |
assignee: | nobody → SuperScript (superscript18) |
Changed in scratch: | |
status: | New → In Progress |
Changed in scratch: | |
milestone: | none → freya-beta2 |
status: | In Progress → Fix Committed |
Changed in scratch: | |
status: | Fix Committed → Fix Released |
Changed in scratch: | |
importance: | Undecided → Medium |
milestone: | freya-beta2 → 2.1 |