#1954 HIGH 9.1.0: Need "Paste" action on clipboard entries

Zarro Boogs per Child bugtracker at laptop.org
Tue Sep 16 11:24:06 EDT 2008


#1954: Need "Paste" action on clipboard entries
----------------------+-----------------------------------------------------
   Reporter:  Eben    |       Owner:  tomeu
       Type:  defect  |      Status:  new  
   Priority:  high    |   Milestone:  9.1.0
  Component:  sugar   |     Version:       
 Resolution:          |    Keywords:       
Next_action:  design  |    Verified:  0    
  Blockedby:          |    Blocking:       
----------------------+-----------------------------------------------------
Changes (by Eben):

 * cc: tomeu (added)
  * next_action:  => design
  * milestone:  Future Release => 9.1.0


Comment:

 This sounds like a tricky problem really.  The acceptable paste mimetypes
 (or the ability to paste at all) might depend on context within the
 activity.  A list in the .info file, while simple, won't cover all the
 necessary cases.  Adding a supported_paste_formats method gets us closer,
 because the activity can return a list of supported formats when the
 clipboard asks for it.  However, this requires the clipboard to
 continuously poll the activity, or the activity to notify the clipboard
 when its status changes.

 An alternative proposal:

 (This is not as elegant, but far easier to handle) Why don't we set up a
 paste method in the activity class.  The base activity class will simply
 return false here, and an activity can override it if they wish.  The
 clipboard will invoke this method of the activity when a paste is made
 from the clipping, passing a list of mime-types for the object.  The
 activity should implement the method, and return true or false to indicate
 whether or not it can support the paste.  If true, the activity then
 initiates the paste operation per the standard APIs.  If false, the
 clipboard notifies the user that the paste couldn't be done.

 This isn't as nice, since it doesn't let the user know before attempting
 the paste if it will succeeed, but it requires much less work on the
 activity's behalf, doesn't require lots of back and forth signals between
 clipboard and activity, and still ensures that the user is always, at
 least, informed when a paste doesn't work.

-- 
Ticket URL: <http://dev.laptop.org/ticket/1954#comment:5>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list