can't drag'n'drop onto an unsaved file

Bug #1397186 reported by SuperScript
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scratch
Fix Released
Medium
SuperScript

Bug Description

This bug has been split from https://bugs.launchpad.net/scratch/+bug/1397103.

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

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
Cody Garver (codygarver)
Changed in scratch:
importance: Undecided → Medium
milestone: freya-beta2 → 2.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.