Hello,

  I played with one of the exemple of gnome-python and I wrote this:

#!/usr/bin/python
from gtk import *
from gnome.ui import *
from GDK import *
import GdkImlib

TARGET_STRING = 0
TARGET_ROOTWIN = 1

target = [
('STRING', 0, TARGET_STRING),
('text/plain', 0, TARGET_STRING),
('application/x-rootwin-drop', 0, TARGET_ROOTWIN)]

def write_info(w, context, x, y, data, info, time):
        if data and data.format == 8:
#               print data.format
                w.drag_finish(context, TRUE, FALSE, time)
        else:
                w.drag_finish(context, FALSE, FALSE, time)

#win = GnomeApp('test', 'test')
win = GtkWindow()
win.connect('destroy', mainquit)

table = GtkTable(2,2)
win.add(table)

label = GtkLabel('Drop Here!\n')
label.drag_dest_set(DEST_DEFAULT_ALL, target[:-1], ACTION_COPY | ACTION_MOVE)
label.connect('drag_data_received', write_info)
table.attach(label, 0, 1, 0, 1)

win.show_all()

mainloop()

And when I launch this little script I got a strange behaviour: when I
drop something on my window (the label), all my icons from gmc
disappear and reappear 1 second later !!??

I do something wrong ?

Regards
-- 
            .------------------------------------------------.
    .^.     | Didier Bretin, France | [EMAIL PROTECTED]    |
    /V\     |-----------------------| www.informactis.com    |
   // \\    |                       `------------------------|
  /(   )\   | Visit: http://www.multimania.com/cieexcalibur/ |
   ^^-^^    `------------------------------------------------'

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to