[Sugar-devel] Web Activity lifecycle and storage
Daniel Narvaez
dwnarvaez at gmail.com
Mon Aug 5 12:54:09 EDT 2013
On Monday, 5 August 2013, Manuel Quiñones wrote:
>
>
> In shell Activity.close(), to do the close directly if it is not a web
> activity. If it is a web activity, emit the signal. You said:
>
> > call get_window().close() only if the signal didn't return True
>
> but I would add: "or if it is not a web activity"
>
For non-web activities nothing will connect to the signal and no value will
be returned. I don't know very well how signal accumulators works in glib
but I suspect emit will just return None if no signal has been connected.
So emit would return True for web activities and None for gtk activities
and you would close the window only when None is returned. This pattern is
similar to delete_event in gtk, it gives a chance to some other code to
handle the event, and fallback to a default implementation if nothing does.
--
Daniel Narvaez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20130805/c9101957/attachment.html>
More information about the Sugar-devel
mailing list