Re: Why is xap_unixClipboard.cpp:canPaste ifdef'd out?

From: Dominic Lachowicz <domlachowicz_at_gmail.com>
Date: Thu Mar 22 2007 - 13:05:40 CET

It's been disabled for 4.5 years now :)

revision 1.25
date: 2002/12/18 17:32:41; author: dom; state: Exp; lines: +1 -1
disable this so we don't get fucking grey menus
----------------------------
revision 1.24
date: 2002/12/03 17:42:29; author: dom; state: Exp; lines: +61 -58
fix unix clipboard interaction by adding canPaste method that is
actually smart-ish
----------------------------

A major problem is how frequently we query the clipboard to see if we
can paste or not. IIRC, it's something like several times per second,
which amounted to polling the clipboard.

As far as I can tell, there is no good way to tell whether you can
paste or not from a X11 clipboard. You just have to try and see what
happens. But of course, my recollection of this is also 4.5 years old,
so I could be talking out of my arse.

http://developer.gnome.org/doc/API/2.0/gtk/gtk-Clipboards.html

Dom

On 3/22/07, Martin Sevior <msevior@physics.unimelb.edu.au> wrote:
>
> Hi everyone,
> Currently the method XAP_UnixClipboard::canPaste looks like
> this:
>
> bool XAP_UnixClipboard::canPaste(T_AllowGet tFrom)
> {
> #if 0
> bool found = false;
> GtkClipboard * clipboard = gtkClipboardForTarget(tFrom);
> .....
> ... lots more code ..
> .....
>
> return found;
> #else
> return true;
> #endif
> }
>
> and of course always returns true. Why is this present? Whoever did this
> please explain so we can fix it.
>
> Right now our paste buttons are always sensitive even if there is
> nothing to paste.
>
> Cheers
>
> Martin
>
>
>

-- 
Counting bodies like sheep to the rhythm of the war drums.
Received on Thu Mar 22 13:06:10 2007

This archive was generated by hypermail 2.1.8 : Thu Mar 22 2007 - 13:06:11 CET