Pasting selections supplied by GTK
Tom Dexter
digitalaudiorock at hotmail.com
Wed Jan 7 01:45:49 CET 2009
First of all, sorry about the bad email formatting. I made the mistake of
using my hotmail account (which I don't use too often) for the list and...
no big surprise...it's a raging piece of you-know-what. It took me forever
just to get it to reply in plain text. I assumed it would wrap the outgoing
stuff like gmail, and it didn't.
> Date: Tue, 6 Jan 2009 22:11:34 +0100
> From: schmorp at schmorp.de
> To: digitalaudiorock at hotmail.com
> CC: rxvt-unicode at lists.schmorp.de
> Subject: Re: Pasting selections supplied by GTK
>
> On Tue, Jan 06, 2009 at 02:58:35PM -0500, Tom Dexter wrote:
>>> I've found that selections supplied by GTK apps using code such as the following example on their devel site:
>
> any easily accessible gtk app that displays any issues? I just tried with
> firefox, gimp and gedit, and all just work. I assume the selection dcode is
> quite similar in them.
>
>>> The reason I ran into this is because I've used wmcliphist (a GTK clipboard history program that uses similar GTK selection code) for quite some time and would like to switch from aterm to urxvt because of the unicode support.
>
> I tried installing wmcliphist, but since I don't have easy access to
> libglib-1 anymore, I couldn't install it.
>
Apparenty Gentoo (which I'm running), as well as some other distributions, have patched the
original wmcliphist to use gtk 2 and glib 2...you may not have access to that. The sample code
on that GTK page, which I've attached (supply.c) compiles on my system with:
gcc supply.c -o supply `pkg-config --cflags --libs gtk+-2.0`
When the resulting 'sample' executable it run, clicking the button labeled 'Claim Selection'
puts text containing the current time in the primary selection.
The thing is that I don't know of any other GTK based program that's expressly trying
to supply the selection programatically.
>>> Any ideas as why that doesn't work? Thanks in advance.
>
> No, but you really should format your e-mails so other people can read them.
> pasting everything together into a few long lines makes your e-mails hard to
> read, and it doesn't make me want to reply to them.
>
>> One question regarding the middle mouse click functionality in urxvt. Am I correct that it pastes the primary selection? That's what appears to be the case from testing using xsel etc.
>
> Yes.
>
>> The above issue I posted originally really perplexes me if that is in fact that case. The primary selection supplied by the sample GTK code I linked to can be pasted with the middle mouse in every terminal program I've tried (in fact every application of any sort that I've tried) except urxvt.
>
> How did you come by with the specific urxvt binary? Did you compile it
> yourself?
>
As I mentioned, I'm running Gentoo, so actually like everything, it was actually compiled on
my system. I'm running the latest stable version in Gentoo: x11-terms/rxvt-unicode-9.05.
My current version of gcc is 4.1.2.
>> Any clues as to why that would be? If I had some idea I might be able to find something on the GTK end that would correct it. Thanks.
>
> No, the selection works just fine between gtk+ apps and urxvt in
> general. I have not found any instance where it wouldn't work.
>
As I mentioned earlier, a lot of GTK apps will let you select text and paste it, but that's not using
the GTK api that programatically populates the primary selection as that sample program
and wmcliphist do.
Thanks a million for the reply, and sorry for the prior crappy hotmail posts.
Tom
> --
> The choice of a Deliantra, the free code+content MORPG
> -----==- _GNU_ http://www.deliantra.net
> ----==-- _ generation
> ---==---(_)__ __ ____ __ Marc Lehmann
> --==---/ / _ \/ // /\ \/ / pcg at goof.com
> -=====/_/_//_/\_,_/ /_/\_\
_________________________________________________________________
Life on your PC is safer, easier, and more enjoyable with Windows Vista®.
http://clk.atdmt.com/MRT/go/127032870/direct/01/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: supply.c
Type: text/x-csrc
Size: 3467 bytes
Desc: not available
URL: <http://lists.schmorp.de/pipermail/rxvt-unicode/attachments/20090106/35c9ccc2/attachment.c>
More information about the rxvt-unicode
mailing list