[Sugar-devel] Web Activity lifecycle and storage
Manuel Quiñones
manuq at laptop.org
Mon Aug 5 13:19:46 EDT 2013
2013/8/5 Daniel Narvaez <dwnarvaez at gmail.com>:
> 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.
Interesting. We don't have any signal in Sugar with a return type
different than None, so time to play with it for the first time.
--
.. manuq ..
More information about the Sugar-devel
mailing list