[sugar] [PATCH] to Browse activity; trac #6250

Erik Garrison erik
Wed Jun 11 11:37:18 EDT 2008


This test follows from my discussion with Chris Ball.

On 703:

1) Connect to an AP.
2) Run browse
3) Suspend the laptop (causing NM to go offline).
4) Un-suspend the laptop.
5) Note that the browser is now in offline mode, but there is no way to
access the menu to put it back in online mode.

Apply patch.  Note that offline mode no longer occurs.

Please tell me if this is not reproducible.

Erik


On Wed, Jun 11, 2008 at 01:33:47PM +0200, Simon Schampijer wrote:
> Hi Erik,
>
> thanks for the patch! Can you describe the steps involved to reproduce 
> what the patch is going to fix?
> For me these steps work without the patch applied:  
> http://dev.laptop.org/ticket/6250#comment:5 (accessing local files and 
> online mode when the link is present again)
> Not saying that the patch is not worth it just want to understand.
>
> And please follow the review guidelines  
> http://wiki.sugarlabs.org/go/DevelopmentTeam/CodeReview next time (not 
> push before the review).
>
> Thanks,
>    Simon
>
> Erik Garrison wrote:
>> The following patch resolves trac #6250 (and #6999).
>>
>> I have tested and pushed the patch into the web-activity git repo.
>>
>>
>>> From 9e3c4d01dc2b368ef0636cce598dd655446fb883 Mon Sep 17 00:00:00 2001
>> From: Erik Garrison <erik at laptop.org>
>> Date: Tue, 10 Jun 2008 14:29:17 -0400
>> Subject: [PATCH] To resolve trac 6250, we disable browser detection of offline mode using xpcom.
>>
>> ---
>>  browser.py |    5 +++++
>>  1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/browser.py b/browser.py
>> index f57bafa..208ff93 100644
>> --- a/browser.py
>> +++ b/browser.py
>> @@ -83,6 +83,11 @@ class Browser(WebView):
>>                  "@mozilla.org/network/io-service;1"]
>>          io_service = io_service_class.getService(interfaces.nsIIOService)
>>  +        # Use xpcom to turn off "offline mode" detection, which 
>> disables
>> +        # access to localhost for no good reason.  (Trac #6250.)
>> +        io_service2 = io_service_class.getService(interfaces.nsIIOService2)
>> +        io_service2.manageOfflineStatus = False
>> +
>>          cls = components.classes['@mozilla.org/content/style-sheet-service;1']
>>          style_sheet_service = cls.getService(interfaces.nsIStyleSheetService)
>>  
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Sugar mailing list
>> Sugar at lists.laptop.org
>> http://lists.laptop.org/listinfo/sugar
>



More information about the Sugar-devel mailing list