<div dir="ltr">On 5 August 2013 17:36, Manuel Quiñones <span dir="ltr"><<a href="mailto:manuq@laptop.org" target="_blank">manuq@laptop.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for the hints Daniel,<br>
<br>
2013/8/3 Daniel Narvaez <<a href="mailto:dwnarvaez@gmail.com">dwnarvaez@gmail.com</a>>:<br>
<div class="im">> On 3 August 2013 02:26, Manuel Quiñones <<a href="mailto:manuq@laptop.org">manuq@laptop.org</a>> wrote:<br>
>><br>
>><br>
>> The problem is: how could the activity process wait for the datastore<br>
>> write to finish? If the WnckWindow close is called [1], the activity<br>
>> process ends. Unless you connect a callback to 'delete-event' [2] and<br>
>> handle the destroy() yourself [3] . Which is what GTK activities do<br>
>> to store before closing.<br>
><br>
><br>
> The shell currently does<br>
><br>
> activity.get_window().close()<br>
><br>
> We could<br>
><br>
> 1 Add a close method to Activity directly. That would emit a close signal<br>
> and call get_window().close() only if the signal didn't return True.<br>
<br>
</div>That's nice. I was trying to keep the patch as unaggressive as<br>
possible. Calling close() instead of get_window().close() implies<br>
changing a few files in shell, but I think that's OK.<br>
</blockquote><div><br></div><div>Yeah, I think it's OK. We have a lot of time left before final release and these wouldn't be invasive changes, despite touching a few files.<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
> 2 Apisocket would connect to that signal, send the stop notification to the<br>
> web activity and return True.<br>
> 3 On stop the activity would first save state, then call activity.close().<br>
<br>
</div>That should be only for web activities, so I'll need to let shell<br>
Activity know if it is a web activity or not. I've been trying to<br>
prevent that, but I don't see other option.<br>
<div class="im"><br></div></blockquote><div><br></div><div>Where do you need to know if it's a web activity exactly? 3 is in js code, 2 is apisocket which only knows about web activities.<br></div></div></div></div>