<br><br><div class="gmail_quote">On Mon, May 23, 2011 at 11:28 AM, Lucian Branescu <span dir="ltr"><<a href="mailto:lucian.branescu@gmail.com">lucian.branescu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I gave you commit and review rights. Feel free to commit the two<br>
patches yourself, removing me as a bottleneck.<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div><br></div><div>Ok Thanks Lucian, about new releases, are you available to do so ? or should I ? ;).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div class="h5">
On 23 May 2011 17:14, Lucian Branescu <<a href="mailto:lucian.branescu@gmail.com">lucian.branescu@gmail.com</a>> wrote:<br>
> Looks good, although it'd be nice at some point for Sugar itself to<br>
> manage force closes better.<br>
><br>
> Wouldn't it be better if I gave you commit rights on mainline instead?<br>
><br>
> On 23 May 2011 16:30, Rafael Ortiz <<a href="mailto:rafael@activitycentral.com">rafael@activitycentral.com</a>> wrote:<br>
>><br>
>><br>
>> On Sat, May 21, 2011 at 10:24 AM, Sascha Silbe <<a href="mailto:silbe@activitycentral.com">silbe@activitycentral.com</a>><br>
>> wrote:<br>
>>><br>
>>> sugar.activity.activity.Activity.close() doesn't take a force parameter.<br>
>>> Instead we need to make sure can_close() returns True the next time and<br>
>>> call<br>
>>> close() without parameters.<br>
>>><br>
>>> The user-visible effect was that they needed to use Stop twice (once to<br>
>>> stop<br>
>>> the pending downloads and a second time to close Browse).<br>
>>><br>
>>> Signed-off-by: Sascha Silbe <<a href="mailto:silbe@activitycentral.com">silbe@activitycentral.com</a>><br>
>>> ---<br>
>>> webactivity.py | 9 +++++++--<br>
>>> 1 files changed, 7 insertions(+), 2 deletions(-)<br>
>>><br>
>>> diff --git a/webactivity.py b/webactivity.py<br>
>>> index b444861..5f1ea5e 100644<br>
>>> --- a/webactivity.py<br>
>>> +++ b/webactivity.py<br>
>>> @@ -184,6 +184,7 @@ class WebActivity(activity.Activity):<br>
>>><br>
>>> _logger.debug('Starting the web activity')<br>
>>><br>
>>> + self._force_close = False<br>
>>> self._tabbed_view = TabbedView()<br>
>>><br>
>>> _set_accept_languages()<br>
>>> @@ -601,7 +602,9 @@ class WebActivity(activity.Activity):<br>
>>> return buf<br>
>>><br>
>>> def can_close(self):<br>
>>> - if downloadmanager.can_quit():<br>
>>> + if self._force_close:<br>
>>> + return True<br>
>>> + elif downloadmanager.can_quit():<br>
>>> return True<br>
>>> else:<br>
>>> alert = Alert()<br>
>>> @@ -616,6 +619,7 @@ class WebActivity(activity.Activity):<br>
>>> alert.connect('response', self.__inprogress_response_cb)<br>
>>> alert.show()<br>
>>> self.present()<br>
>>> + return False<br>
>>><br>
>>> def __inprogress_response_cb(self, alert, response_id):<br>
>>> self.remove_alert(alert)<br>
>>> @@ -623,8 +627,9 @@ class WebActivity(activity.Activity):<br>
>>> logging.debug('Keep on')<br>
>>> elif response_id == gtk.RESPONSE_OK:<br>
>>> logging.debug('Stop downloads and quit')<br>
>>> + self._force_close = True<br>
>>> downloadmanager.remove_all_downloads()<br>
>>> - self.close(force=True)<br>
>>> + self.close()<br>
>>><br>
>>> def get_document_path(self, async_cb, async_err_cb):<br>
>>> browser = self._tabbed_view.props.current_browser<br>
>>> --<br>
>>> 1.7.4.1<br>
>><br>
>> Applied and tested, works as expected thanks.<br>
>> Can you apply to mainline ?.<br>
>>><br>
>>> _______________________________________________<br>
>>> Sugar-devel mailing list<br>
>>> <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
>>> <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
>><br>
>><br>
><br>
</div></div></blockquote></div><br>