(BTW, a comment on FreeDesktop specs: they're basically supposed to be 
agreements between various desktop and WM developers on how to do things)

> Did they move this feature somewhere else in HEAD?

Yes, to the libraries; see 
http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdelibs/kdecore/kclipboard.cpp?rev=1.29&content-type=text/vnd.viewcvs-markup

KClipboard::self() is called in KApplication::init(); my understand is that 
this is supposed be reliable, unlike clipper trying to do it.

> Take a look at slotCopyLinkLocation().  The code appears to be emulating
> a drag.  And the comment even says it's updating both clipboards.

Yes, indeed

>
> Which means the KDE developers aren't intending to follow the standard
> you gave me.

Actually, if you see above, it seems to me that both behaviors look consistent 
with it, but that it doesn't matter most of the time because you usually have 
to select to do Ctrl-C. 

  AND there is a bug in KDE because this doesn't work right
> anymore.

Probably :-(

> Now let's do something similar with konqueror.  Drag over something.
> Go to konqueror and choose Copy Link Location.  Now try to paste with
> the middle mouse button in Eterm.  You get *NOTHING*. 

Let me try in HEAD, to see what Konsole does. Hmm, looks like both Ctrl-V and 
Middle-click paste work. (Checking, I have synchronization off). With rxvt, 
the middle-click doesn't. So I think the reason is probably quite different 
-- it's storing a complex mimetype URL and not a plaintext one, and that 
somehow isn't decodeable for rxvt/Eterm..

Running the following:
#include <qapplication.h>
#include <qclipboard.h>
#include <qmime.h>

int main(int argc, char** argv)
{
   QApplication app(argc,argv);
   
   QClipboard* clip  = QApplication::clipboard();
   clip->setSelectionMode(true);
   QMimeSource* data = clip ->data();
   if (!data)
      qFatal("No data in clipboad!");
   int pos = 0;
   
   while (data->format(pos))
   {
      qDebug("Format supported:%s", data->format(pos));
      pos++;
   }
}

On the paste results for text I get:
Format supported:text/plain;charset=UTF-8
Format supported:text/plain
Format supported:text/plain;charset=ISO-8859-1
Format supported:text/plain;charset=UTF-8
Format supported:text/plain;charset=ISO-10646-UCS-2
Format supported:text/plain

While for the URL copy I get: 
Format supported:text/plain;charset=UTF-8
Format supported:text/plain
Format supported:text/plain;charset=ISO-8859-1
Format supported:text/uri-list
Format supported:text/plain

I don't know anything about QClipboard internals, but I guess I'll look it 
up.. Thoughts?




Reply via email to