Drag and Drop of text in editor is buggy

Reported by sch01ar on 2010-04-20
56
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Zim
High
Sebastian Audet

Bug Description

On selecting and moving text, the "pick up" is OK, but on dropping, either:
1. usually nothing happens - the text won't be moved
2. sometimes, the text is duplicated into the destination, and remains in the original location
3. Rarely, it works as expected

I'm using zim 0.46 on Ubuntu 9.10

Thanks,

S

zim -D gives:

INFO: This is zim 0.46
DEBUG: Python version is (2, 6, 4, 'final', 0)
DEBUG: Zim revision is:
 branch: pyzim-trunk
 revision: 221 <email address hidden>
 date: 2010-03-24 23:06:16 +0100

Changed in zim:
importance: Undecided → High
status: New → Confirmed

Just retested, now I consistently get no result. I observed the copy behavior described in the report before, so maybe due to Gtk update in between.

Background is that zim handles the drop itself, but not the drag start. Looks like the view takes a shortcut on deciding what data type to drag and does not check our advertised data types.

The copy behavior probably is the case where we do get a compatible data type and paste it, but we should either do the delete ourselves or send some signal to notify that the delete can happen.

zapyon (zapyon) wrote :

Just stumbled upon this one using Zim! 0.56-1 (package version) on Linux Mint Debian Edition (LMDE).
Several attempts to drag-n-drop one word within one Zim! wiki page, either with or without using the shift key, did not provide any result, even though the mouse seems to move the selection and the target cursor is displayed.

Regards

Andreas

andré (andr55) wrote :

A few times I've had problems with drag and drop, where Zim gets corrupted and I've had to rename the Zim directories and reinstall.
I haven't lost any data, but at least in the most recent case the data being moved was in an unexpected location, but otherwise intact. At least the third time such a problem. Most recently with version .52, on Mageia 2, which has migrated to gtk+3.
This may be related to a sometimes erratic mouse, which isn't a Zim problem per se.
(I avoid using drag and drop because of the problems, but sometimes I forget. If I use ctl/x ctl/v, that has always been reliable.)

Andre,

Are you talking about drag & drop of pieces of text in the page, or are you
talking about drag and drop of pages in the index ?

This bug report is about the first (drag and drop text). If you have
another issue, please put it in a separate report. Would be a big help to
have a description of how to reproduce the issue.

Regards,

Jaap

P.S. Zim will not use Gtk3, so probably you also still have Gtk2 installed

On Wed, Nov 14, 2012 at 3:53 AM, andré <email address hidden> wrote:

> A few times I've had problems with drag and drop, where Zim gets corrupted
> and I've had to rename the Zim directories and reinstall.
> I haven't lost any data, but at least in the most recent case the data
> being moved was in an unexpected location, but otherwise intact. At least
> the third time such a problem. Most recently with version .52, on Mageia
> 2, which has migrated to gtk+3.
> This may be related to a sometimes erratic mouse, which isn't a Zim
> problem per se.
> (I avoid using drag and drop because of the problems, but sometimes I
> forget. If I use ctl/x ctl/v, that has always been reliable.)
>
> --
> You received this bug notification because you are subscribed to Zim.
> https://bugs.launchpad.net/bugs/567142
>
> Title:
> Drag and Drop of text in editor is buggy
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/zim/+bug/567142/+subscriptions
>

Sebastian Audet (smaudet) wrote :

Having this issue on Windows 7 as well.

Sebastian Audet (smaudet) wrote :

I've taken a look at this, I think I may be able to fix it.

I don't suppose anyone would mind if I submit a patch.

On Thu, Apr 11, 2013 at 10:56 PM, Sebastian Audet <email address hidden> wrote:
> I don't suppose anyone would mind if I submit a patch.

Of course not :) Patches are always welcome.

There is a redesign of that part of the code ongoing as well, where I
intend to fix it. But that is at least a few months out. So if you
have something to fix the current code in the mean time, that would be
very welcome.

Regards,

Jaap

Sebastian Audet (smaudet) wrote :

Sounds good!

I'll submit it here in a bit.

tags: added: pageview
Hector Z (m8r-15x1tp) wrote :

Was going to add this as a bug and found that the bug already existed.

Same here. If I select text and try to drag and drop it inside the same page, it doesn't work, the text is not moved.

This is zim 0.60
Python version is sys.version_info(major=2, minor=7, micro=3, releaselevel='final', serial=0)
Gtk version is (2, 24, 10)
Pygtk version is (2, 24, 0)
Platform is posix
Zim revision is:
  branch: pyzim-trunk
  revision: 672 <email address hidden>
  date: 2013-04-30 19:27:20 +0200

Sebastian Audet (smaudet) wrote :

Sorry I see I was going to fix this bug awhile back - things happen. Anyways I will be fixing the other copy/paste bug first, since it is giving me better insight into the internals (and I might just also be a better Python programmer now).

Changed in zim:
assignee: nobody → Sebastian Audet (smaudet)

Please make sure to base your work on the "pyzim-refactor" branch. Else it will conflict with various changes on next sync.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers