[sugar] Question about clipboard service

Tomeu Vizoso tomeu at tomeuvizoso.net
Sat Jul 19 04:19:05 EDT 2008


On Fri, Jul 18, 2008 at 10:29 PM, Faisal Anwar <fanwar at mediamods.com> wrote:
> Hi,
>
> I'm playing around with the clipboard package on sugar and had a quick
> question. So, the clipboardservice.py file shows some basic api for getting
> and setting objects on the clipboard through the dbus. However, the
> add_object and get_object methods (and their variants) rely on knowing an
> object_id in order to retrieve something from the clipboard. Typically, a
> clipboard has some stack like structure where you can automatically retrieve
> the last thing copied to the clipboard without necessarily knowing its
> internal id. This would seem especially important fo passing things to other
> activities, which can't reasonably figure out the object_id created when
> something is saved to the clipboard by another activity. Does anyone know
> how to just retrieve the last item saved to the clipboard and also get a
> list of the last N items saved to the clipboard?
>
> Also, the gtk.Clipboard framework allows access to several different
> clipboards that have slightly different purposes. Is there similar
> functionality available through sugar/dbus or would one go directly to the
> gtk implementation?

Hi Faisal,

we haven't reached any agreement yet about exposing a different
clipboard API than the one in gtk+ (that wraps around the different
clipboard-related specs used in X).

In other words, nobody other than the shell should directly use the
clipboard service and this will probably disappear in the future.
Activity authors should the use the clipboard functionality as exposed
by their toolkits (gtk+) or implement themselves those specs (as etoys
has done). Can you add this note somewhere in the almanac?

Thanks,

Tomeu



More information about the Devel mailing list