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

From: Dominic Lachowicz <domlachowicz_at_gmail.com>
Date: Thu Mar 22 2007 - 14:55:59 CET

> > 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.
>
> Question #1: Why do we poll that often?

AbiWord's AV_Listeners get signaled quite often - so often, that it's
effectively equivalent to polling. The "change masks" are pretty broad
- "something regarding character formatting changed" instead of
"bold". This was a problem with mapping AbiWord's signals to GTK+'s
signals for the AbiWidget.

> > 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
>
> Question #2: Don't we have a way to get told by the clipboard that its
> content changed?

The AbiWord clipboard? No, not presently. The communication mechanism is:

Toolbars and menus ask the app if their state changed. What would be
preferable is "toolbards and menus get told that their state changed."

This isn't insurmountable, but it's a good deal of architectural work.

Dom

-- 
Counting bodies like sheep to the rhythm of the war drums.
Received on Thu Mar 22 14:55:58 2007

This archive was generated by hypermail 2.1.8 : Thu Mar 22 2007 - 14:55:59 CET