I'm trying to get X's clipboard contents to be automatically made the
default entry in a gtk.Entry field.  I've tried finding examples for
this, but none of them seemed to work.  Here's that part of the code:

               textview = gtk.TextView()
               textbuffer = gtk.TextBuffer(None)
               display = gtk.gdk.display_manager_get().get_default_display()
               clipboard = gtk.Clipboard(display, "CLIPBOARD")
               urlpaste = textbuffer.paste_clipboard(clipboard, None,
textview.get_editable())
               label = gtk.Label(_("Enter the URL of the .torrent to
download"))
               entry = gtk.Entry()
               entry.set_text(urlpaste)

this fails on me with:
    entry.set_text(urlpaste)
TypeError: GtkEntry.set_text() argument 1 must be string, not None

No matter what, I cant get the clipboard contents to be automatically
put into urlpaste.  Any tips at all are greatly appreciated.

Thanks all,
Marcos
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to