Menu

#170 move tab by drag and drop

development
open
nobody
Program (79)
5
2008-10-24
2008-10-24
No

Hi, there is an update of the patch drag-move-v1_2.diff, against NEdit 5.5 release (the original patch is 920929).

The changes from the original patch are:

- If you drop a tab to the left or the right side of another tab, it will be placed to the left or to the right of this tab (in 1.2 it's always to the right)

- If you drop a tab to its neighbour, they will always swap, no matter what side did you drop it.

- Works correctly if dropped from another nedit process (will not move anything of course, but will not crash as well). The better way would be to place some unique nedit server ID (PID + X connection, maybe) to the DragWidget and read it on drop site - please feel free to implement.

Please let me know how it works. Thanks.

The original patch is here:
https://sourceforge.net/tracker/?func=detail&aid=920929&group_id=11005&atid=311005

Discussion

<< < 1 2 (Page 2 of 2)
  • Nobody/Anonymous

    I happened to compile the source code with optimization "-O3" and got a crash when I tried to move a tab by drag and drop.

    I tried to debug the code, the following is the results:

    1) source compiled with "-O3". gdb said

    "Program received signal SIGSEGV, Segmentation fault.
    0x00000000004d1402 in getClosestTab ()"

    2) source compiled with "-g -O3": gdb said:

    "Program received signal SIGSEGV, Segmentation fault.
    0x00000000004d1402 in tabSideNeighborAdjustment (tabSide=LEFT_TAB_SIDE, widget=<value optimized out>)
    at tabDragDrop.c:392
    392 if (ddtInfo.draggedWindow->shell != windowUnder->shell) {"

    3) Then I tried to compile with "-O" only. gdb said

    "Program received signal SIGSEGV, Segmentation fault.
    0x000000000049db4f in tabSideNeighborAdjustment ()"

    All above indicates they might be bugs somewhere in this patch.

    I am using the source code from a nedit developer's GIT repository "http://repo.or.cz/w/nedit-bw.git". You can get
    the source in the following steps:

    cvs -d:pserver:anonymous@nedit.cvs.sourceforge.net:/cvsroot/nedit login
    cvs -z3 -d:pserver:anonymous@nedit.cvs.sourceforge.net:/cvsroot/nedit co -P nedit
    cd nedit
    git clone git://repo.or.cz/nedit-bw.git patches
    quilt push -a

    Another problems about this patch are:

    1) even I can move an tab the cursor is not as good as you shown on http://enerjazzer.livejournal.com/47957.html. While dragging, the tab and the cursor always look strange.

    2) The is not an entry in the preferences menu such that users can change and save the settings.

    Thanks.

     
  • Maxim Yanchenko

    Maxim Yanchenko - 2010-02-21

    Thank you very much for reporting the issue.
    Could you please include more details, like OS/Motif/X server you're using?
    Also detailed steps to reproduce the issue would be very helpful, e.g. start nedit with these options, open two files, try to drag&drop left tab to the right, something like this.

    As I use this patch for almost two years (with NEdit 5.5), with no problem except rendering problems I mentioned (see my comment from 2008-11-11 19:42 below, I believe this is due to X server mishandling of pixmap cursors, so maybe you need to turn one of the options off).
    Could you please try various options on/off to find an option pattern that doesn't give you any artifacts?

    Also, could you please try building NEdit 5.5 with this patch on your system? Does it work? Are there any other patches you applied additionally to this patch that could interfere?

    This will help to identify the root cause of the problem.

    Thank you very much,
    Maxim

     
  • Nobody/Anonymous

    I confirm that the crash didn't happen if I only apply the patch to nedit-5.5.

     
  • Nobody/Anonymous

    forgot to mention that it might be conflicting with the "Open new Tab" patch post on October 2009 NEdit discussion list.

     
  • Maxim Yanchenko

    Maxim Yanchenko - 2010-02-23

    Thanks for the update.
    Could you try build the latest version, but without the "Open new Tab" patch?
    Will it still crash?

    Thanks,
    Maxim

     
  • Nobody/Anonymous

    No. it doesn't crash as long as I don't apply the "open new tab" patch.

     
<< < 1 2 (Page 2 of 2)

Log in to post a comment.