#170 move tab by drag and drop

development
open
nobody
Program (79)
5
2008-10-24
2008-10-24
Maxim Yanchenko
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 1 of 4)
  • patch against NEdit 5.5

     
    Attachments
  • TK Soh
    TK Soh
    2008-10-24

    Glad to finally see some progress on this patch. Thanks for working on it.

     
  • What's new in patch 1.4:

    - Inter-process drops are fully fixed now.
    - Cursor changes its shape to the tab being dragged
    - When hovering the dragged tab above the tab bar, it shows the drop position
    - Drag&drop is controlled by three options (all False by default):
    - - dragDropTabs - enable drag and drop for tabs
    - - dragDropTabsCursor - enable nice cursor
    - - dragDropTabsAnimation - enable drag and drop animation

    Tested with OpenMotif 2.3.0 over Exceed on Windows only, so please test it with other Motifs, X servers, window managers, and let me know how it works (on Exceed 11.0.0.0, I see artifacts while drawing under a moving cursor).
    Thanks.
    File Added: drag-move-v1_4.diff

     
  • patch against NEdit 5.5

     
    Attachments
  • Tony Balinski
    Tony Balinski
    2008-11-20

    Looks like your 1.4 patch doesn't include files tabDragDrop.c, tabDragDrop.h, and must be applied (presumably) after applying 1.3. Is this correct? Otherwise, I'm going to give this a go: I use TK's tab d&d quite a lot!
    Thanks,
    Tony

     
  • Bert Wesarg
    Bert Wesarg
    2008-11-20

    No problem here as a first time patch applier. Builds and works fine with OM2.3.1.

     
  • I see now: my download hadn't copied the complete file... sorry for the wasted bandwidth!
    Tony

     
  • Bert Wesarg
    Bert Wesarg
    2008-12-06

    I got un-nice compiler warnings from the tabDragDrop.c file, these should be addressed:

    tabDragDrop.c: In function 'createTabDragCursor':
    tabDragDrop.c:195: warning: implicit declaration of function 'abort'
    tabDragDrop.c:195: warning: incompatible implicit declaration of built-in function 'abort'
    tabDragDrop.c:201: warning: suggest parentheses around assignment used as truth value
    tabDragDrop.c: In function 'beginTabDragAP':
    tabDragDrop.c:218: warning: implicit declaration of function 'GetPerfDragDropTabs'
    tabDragDrop.c:226: warning: implicit declaration of function 'GetPerfDragDropTabsCursor'
    tabDragDrop.c: In function 'moveTabProc':
    tabDragDrop.c:240: warning: implicit declaration of function 'GetPrefSortTabs'
    tabDragDrop.c: In function 'getClosestTab':
    tabDragDrop.c:384: warning: implicit declaration of function 'abs'
    tabDragDrop.c: In function 'redrawTabBarProc':
    tabDragDrop.c:413: warning: implicit declaration of function 'XmRedisplayWidget'
    tabDragDrop.c: In function 'tabDragProc':
    tabDragDrop.c:460: warning: missing sentinel in function call
    tabDragDrop.c:493: warning: missing initializer
    tabDragDrop.c:493: warning: (near initialization for 'gcVals.function')

    mostly missing includes. but the 'missing sentinel in function call' and 'suggest parentheses around assignment used as truth value' are IMHO real bugs.

     
  • This does not compile under solaris - with Motif 2.1
    Apparently, the solaris version of Motif does not support XmRedisplayWidget

     
  • patch against NEdit 5.5

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