Re: [Tkinter-discuss] Drag n drop from another application

2017-08-25 Thread Michael Lange
Hi Vasilis,

On Fri, 25 Aug 2017 14:29:34 +
Vasilis Vlachoudis  wrote:

> Great thanks.
> I will give it a try.

I finally uploaded the new version 0.3 of TkinterDnD2, this version now
works with both Python2 and Python3. I also added a few new (hopefully
helpful) demo scripts. I think I had to change the API to fix some bugs
(although at the moment I cannot remember the details :) , so if you
already downloaded v. 0.1 you are probably better off replacing it. I did
a brief test with the demos here, as far as I can see everything seems to
work ok. If you still find a bug, please report it here, then I will try
to fix it asap.

Best regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

No one may kill a man.  Not for any purpose.  It cannot be condoned.
-- Kirk, "Spock's Brain", stardate 5431.6
___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss


Re: [Tkinter-discuss] Drag n drop from another application

2017-08-25 Thread Vasilis Vlachoudis
Great thanks.
I will give it a try.

Best
Vasilis


From: Tkinter-discuss 
[tkinter-discuss-bounces+vasilis.vlachoudis=cern...@python.org] on behalf of 
Michael Lange [klappn...@web.de]
Sent: Friday, August 25, 2017 11:34
To: tkinter-discuss@python.org
Subject: Re: [Tkinter-discuss] Drag n drop from another application

Hi Vasilis,

On Fri, 25 Aug 2017 08:21:03 +
Vasilis Vlachoudis <vasilis.vlachou...@cern.ch> wrote:

> Thank you Michael,
>
> is this the same with the Tkdnd.py module inside tkinter, or it is an
> extension of it?

no, Tkdnd.py is pure Tkinter code and can only handle dnd within one
Tkinter program.
For "real" dnd you will need tkdnd. BTW, iirc there is a problem with
tkdnd-2.6 (which is still the version included with debian and probably
other linux/unix systems). I am not 100% sure, but I believe drops would
only work if the drop target is a direct child of the toplevel window,
which has been fixed with tkdnd-2.8. I never really used tkdnd in a real
application, so it's a little hard to remember exactly, it was something
like this. With tkdnd-2.8 also dragging from Tkinter to the file manager
should work, so if you want to use it, it might be a good idea to
upgrade (although a number of X11 file managers I tested behaved
differently, some accepted the drops from Tk, others wouldn't and pcmanfm
always crashed :)
You can find the latest version at
https://sourceforge.net/projects/tkdnd/files/ ,
compiling should be rather easy, here a simple ./configure && make &&
make install did the job.

Best regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

Most legends have their basis in facts.
-- Kirk, "And The Children Shall Lead", stardate 5029.5
___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss
___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss


Re: [Tkinter-discuss] Drag n drop from another application

2017-08-25 Thread Vasilis Vlachoudis
Thank you Michael,

is this the same with the Tkdnd.py module inside tkinter, or it is an extension 
of it?

V.



From: Tkinter-discuss 
[tkinter-discuss-bounces+vasilis.vlachoudis=cern...@python.org] on behalf of 
Michael Lange [klappn...@web.de]
Sent: Thursday, August 24, 2017 23:26
To: tkinter-discuss@python.org
Subject: Re: [Tkinter-discuss] Drag n drop from another application

Hi Vasilis,

On Thu, 24 Aug 2017 14:04:15 +
Vasilis Vlachoudis <vasilis.vlachou...@cern.ch> wrote:

> Hi All,
>
> is there a way to catch a drop signal from KDE, GNOME, etc..
> e.g. dragging a file from the file browser in x11 to an application
> with Tkinter

the tkdnd Tk extension can do that. I wrote a Tkinter wrapper for tkdnd
some time ago ( http://tkinterdnd.sourceforge.net/ ), the version
available there however is buggy and works only partially. I have a much
improved version here that I wanted to upload as soon as I find the time
to run a few more tests and update the docs, if you would like to try
that one I could send it to you off-list.

Best regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

Superior ability breeds superior ambition.
-- Spock, "Space Seed", stardate 3141.9
___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss
___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss


Re: [Tkinter-discuss] Drag n drop from another application

2017-08-25 Thread Michael Lange
Hi Vasilis,

On Fri, 25 Aug 2017 08:21:03 +
Vasilis Vlachoudis  wrote:

> Thank you Michael,
> 
> is this the same with the Tkdnd.py module inside tkinter, or it is an
> extension of it?

no, Tkdnd.py is pure Tkinter code and can only handle dnd within one
Tkinter program.
For "real" dnd you will need tkdnd. BTW, iirc there is a problem with
tkdnd-2.6 (which is still the version included with debian and probably
other linux/unix systems). I am not 100% sure, but I believe drops would
only work if the drop target is a direct child of the toplevel window,
which has been fixed with tkdnd-2.8. I never really used tkdnd in a real
application, so it's a little hard to remember exactly, it was something
like this. With tkdnd-2.8 also dragging from Tkinter to the file manager
should work, so if you want to use it, it might be a good idea to
upgrade (although a number of X11 file managers I tested behaved
differently, some accepted the drops from Tk, others wouldn't and pcmanfm
always crashed :)
You can find the latest version at
https://sourceforge.net/projects/tkdnd/files/ ,
compiling should be rather easy, here a simple ./configure && make &&
make install did the job.

Best regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

Most legends have their basis in facts.
-- Kirk, "And The Children Shall Lead", stardate 5029.5
___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss