Paste special

Jaroslaw Staniek js at iidea.pl
Mon Sep 17 18:25:58 BST 2007


Jos Poortvliet said the following, On 2007-09-16 14:06:
> On 9/16/07, John Tapsell <johnflux at gmail.com> wrote:
>> Thomas,
>>>  ODF is not a 'text/*' mimetype.  And it still contains text (which is
>> pastable for many apps as soon as we get the kodf module up and running)
>>
>>   I get your point, but I don't really see a usecase to be honest.
>>
>>   I think you are making this overly complex for a first iteration.
>> Konversation already shows a dialog to let you reformat it, and I
>> think that sort of thing is going to be application specific.
>>
>>   I think that for a first try at this, a simple menu option is
>> sufficient.  Just show all text/* mimetypes in a human readable way,
>> in a menu.
>>
>> John
> 
> I don't know how related this is, but does this have to do with for
> example copy-paste from konqi? EG currently, it always just copy's
> text. If I copy text from IE in Windows into MS word, it properly
> copies the markup, fonts and urls as well. I'd love to see that in
> KDE...  Same with KPDF etc etc.

This works in many apps and OSes, because the standard habit is to place plain 
text format and rich text one in the same clipboard. For those worried about 
performance: this is of course designed for small chunks of data, larger 
portions can be handled by DDE-like "on demand" operations. I wish I could 
show this in action ad KDE level.

Regarding the new std action, I guess it would only be sane to have one "paste 
special..." action as proposed before, defined in kdeui. Applications that 
really need to override this, could just define their own actions. Today (and 
only today) this looks better to me than trying to extract some logic like 
"support for text/* mimetypes" from many apps and push it into kdelibs.

One note here is that the current action framework can be not enough in terms 
of action names. For instance, "Paste Special->As HTML" action could lead to 
having cryptic "As HTML" action in places like toolbar/shortcut editor dialog.

In Kexi 1.x, where action names are user more heavily due to scripting and 
signal-slot-like connections defined by users, I have avoided the problem by 
using and displaying tooltip texts instead of text(). But then none of the 
mentioned editors use this approach.

-- 
regards / pozdrawiam, Jaroslaw Staniek
  Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
  Kexi & KOffice: http://www.kexi.pl/en, http://www.koffice.org
  KDE3 & KDE4 Libraries for MS Windows: http://kdelibs.com, http://www.kde.org




More information about the kde-core-devel mailing list