#174 Added feature: drop of a file open it in a tab.

open
nobody
None
5
2009-04-09
2009-04-09
Per Grahn
No

Added feature:
Added a drop target to the widget "text" which know about files and open the file in a new tab.
Can handle files dropped from CDE filemanager and several GTK-based filemanagers.
is tested on sun/solaris9 and linux-x86_64 (opensuse 11.1 and 10.3) using openmotif library.
If compiled with -DCDE, when we use CDE version of DND functions.

Discussion

  • Per Grahn
    Per Grahn
    2009-04-09

    patch from the version with the "BETA-5-6" tag

     
    Attachments
  • I have some notes, questions:

    1. your patch includes more than you have wrote in your description, obviously!

    2. you are using a git clone, have you tried my git clone: http://repo.or.cz/w/nedit.git ?

    3. I have not tried it yet (must extract the crucial parts first) but can this also handle dropping primary selections? (i.e. select in firefox some text and drag this into an nedit text area).

    4. whats this cpyArgv/cpyArgc and what has this to do with the window title. And why is the cpyArgv only [20] entries big?

    Thanks,
    Bert

     
  • You revised my patch really fast. Here are my answers.

    1 and 4. Yes, there are another feature which I forgot. The feature is to make it possible for session managers
    to read a program starting command line and remember it, so they can be restarted with the same file(s). I
    started to develop this feature many years ago (for nedit 5.2) but was interrupted. I never finished it as
    intended. Therefore, it was a mistake to include that code in the patch.

    2. Yes I'm using git, and no, I haven't tried your git clone since I didn't know about it. I did my own clone from
    the cvs service at SF, mainly as a test. It worked good but it took nearly 2 hours to complete.

    3. The drop handling code handles two kind of drops: files and strings. For this to work the source
    application must be a drag initiator for one of these types. File managers like CDE:s filemgr, Gnome:s
    nautilus and XFCE:s xftree is drag initiators as well as text editors like gedit. You could select a piece
    of text in a text file, opened by gedit and drag it to nedit. I have also tried firefox, but it didn't work, so I
    don't think firefox is a drag initiator.

    4. cpyArgv/cpyArgc is part of the code commented in 1.

    Regards,
    Per

     
  • Bert Wesarg
    Bert Wesarg
    2009-04-11

    No, I have just looked into the patch file. And you should have do this too. And if you haven't it till now, than do it now, please.