Help save net neutrality! Learn more.
Close

#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 3 4 > >> (Page 3 of 4)
  • Nobody/Anonymous

    if I set nedit.dragDropTabsCursor=False, then the drag&drop behaves consistently. So maybe there is a bug regarding with this setting.

    Another problem is: if I put those settings:

    nedit.dragDropTabs: True
    nedit.dragDropTabsCursor: False
    nedit.dragDropTabsAnimation: True

    in nedit.rc, and if I change my default preference and save it in the future (preference->save defaults), they will be lost.

     
  • Maxim Yanchenko

    Maxim Yanchenko - 2009-07-12

    Regarding the last two comments:
    1) Regarding the missing nedit.rc settings.
    The settings should be put in your .Xdefaults file (or passed via -xrm command-line option). Setting/storing it inside nedit (and nedit.rc that is maintained by nedit) is not currently supported, however there is a request from 2009-04-16, and I'll take care of it when I have time.
    2) Regarding the strange cursor appearance.
    Could you try to build the released 5.5 with this patch applied as well? Just to make sure that nothing was changed in 5.5 -> 5.6 upgrade. As to the dragDropTabsCursor option, it's intentionally created to give an ability to switch off a non-working aspect of the patch behavior: in my case it's dragDropTabsAnimation (Exceed X Server), in your case it's looks like dragDropTabsCursor doesn't work correctly). Could you also check your X Server settings regarding pixmap cursors? Probably you will find a combination of options that will work.

    The cursor should look exactly as a tab, see a screenshot here:
    http://enerjazzer.livejournal.com/47957.html

     
  • Nobody/Anonymous

    1) I tried with nedit 5.5+this patch and nothing changed.

    2)which X server might cause the problem?

    Thanks.

     
  • Nobody/Anonymous

    should be "which X server setting". sorry.

     
  • Maxim Yanchenko

    Maxim Yanchenko - 2009-07-14

    I don't know for sure, it depends on the X server you're using.
    Please try to look at any options that mention cursors.

    Could you please also share your configuration (OS and X Server version, maybe video card driver too), so other users with similar things could share their experience?
    Mine is probably irrelevant to your case as I'm using Exceed on Windows.

    However, from my experience, some things that are adjustable with Xperf affect NEdit appearance, so you can start with this.

    Could you also post your question to the NEdit mailing list? It looks like updates here don't automatically come there for some reason.

     
  • 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

     
<< < 1 2 3 4 > >> (Page 3 of 4)

Log in to post a comment.