Re: [pygtk] GDK_SELECTION_PRIMARY

2001-10-24 Thread Christian Robottom Reis

On Mon, 22 Oct 2001, Jon Nelson wrote:

> What I want to do is, when the appropriate menu entry is selected,
> copy a line from a CList to the X clipboard.  How do I do this?

Uhm. So this has nothing to do with menus? You want to click on a clist
row and have the line inserted into the X clipboard? Right now I don't
know if that's possible: AFAICT we do have a GtkSelectionData type in
pygtk, but I can't see an easy way to set the data. Hmmm.

Check out the GTK Selection section of the GTK tutorial, and see if you
can get a function that returns a GtkSelectionData instance. If you do,
you can try meddling with the set() method it provides (see gtkmodule.c).
Chances are you'll need to hook to some signal handler that returns this
or perhaps even hack a function in - I'm too sleepy to find out on my own
right now :)

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 272 3330 | NMFL

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



[pygtk] GDK_SELECTION_PRIMARY

2001-10-22 Thread Jon Nelson

I'm having trouble implementing selecting in PyGTK.
Using the following as a guide:
http://www.gtk.org/tutorial/sec-supplyingtheselection.html
where does GDK_SELECTION_PRIMARY get mapped into PyGTK?
I don't see it anywhere.

What I want to do is, when the appropriate menu entry is selected,
copy a line from a CList to the X clipboard.  How do I do this?
I am not adverse to patching PyGTK.
I am using 0.6.8 right now.

-- 
Jon Nelson\|/  \|/   Gort,
[EMAIL PROTECTED]"@'/ ,. \`@"   Klaatu
C and Python Programmer   /_| \__/ |_\   barada
Motorcycle Enthusiast\__U_/  nikto.
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk