After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 459022 - DnD on a TextView which is not editable
DnD on a TextView which is not editable
Status: RESOLVED NOTABUG
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
2.10.x
Other All
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-07-21 16:46 UTC by Delete me
Modified: 2007-10-18 04:01 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
DnD testcase on a TextView, written in pygtk (553 bytes, text/plain)
2007-07-21 16:50 UTC, Delete me
Details
Working custom textview dnd (1.55 KB, text/plain)
2007-10-18 04:01 UTC, Owen Taylor
Details

Description Delete me 2007-07-21 16:46:45 UTC
It seems that there is no easy way to make DnD of files work on a TextView which is not editable.

I can understand the intention to not enable this in GTK because a DnD is supposed to "change" something.

I thought about possible workarounds like catching the DnD with an EventBox or enabling the TextView on drag_motion and disable it on drag_leave. (I could not make it work with the EventBox)

Nevertheless, why not let a TextView behave the same, whether it is editable or not?
Comment 1 Delete me 2007-07-21 16:50:33 UTC
Created attachment 92127 [details]
DnD testcase on a TextView, written in pygtk

Please try and drop a file on the TextView, with and without line 11 commented.
Comment 2 Owen Taylor 2007-10-18 04:01:15 UTC
Created attachment 97399 [details]
Working custom textview dnd

I don't think it's legitimate to override just part of the TextView dnd like that.
You are piggybacking off of part of the handling that is meant to insert text,
so naturally the feedback and whether it accepts the drops is going to depend
on whether it is editable or not.

Here's a more complete (if not fully debugged) example of how you might override
handling of DND in GtkTextView, taking file drops when not editable.