Activity Quit Signal

Kristofer Plunkett kp86 at u.washington.edu
Thu Nov 6 16:39:29 EST 2008


Perfect!  Works like a charm.  Thanks a bunch.

-Kris


On Thu, Nov 6, 2008 at 8:57 AM, Simon Schampijer <simon at schampijer.de>wrote:

> Kristofer Plunkett wrote:
>
>> Hi there,
>>
>> I'm working on a Sugar activity called Classroom
>> Presenter<http://xo.orderedpixels.com>and have the need to find out
>> when the activity is quitting.  It looks like
>> there is a 'quit' signal in activity.py, but it is part of a private
>> subclass.  The write_file() method seems like the only way to gain access
>> to
>> that information, but that method also gets called occasionally when the
>> activity is not quitting, so this is not a reliable means.
>>
>> Is there a better way?  A way at all?  If not, should I file a bug report?
>> Maybe try modifying activity.py and offering a patch?
>>
>> Thanks,
>> Kris
>>
>
> Just override the can_close method like browse is doing can work.
>
> http://dev.laptop.org/git?p=web-activity;a=blob;f=webactivity.py;h=badc6f7ec185350f7e68750a06c1194aeec93535;hb=HEAD#l450
>
> HTH,
>   Simon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.laptop.org/pipermail/devel/attachments/20081106/74877574/attachment.html>


More information about the Devel mailing list