Re: [sugar] [PATCH] to Browse activity; trac #6250
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 [EMAIL PROTECTED] 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@lists.laptop.org http://lists.laptop.org/listinfo/sugar ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
Re: [sugar] [PATCH] to Browse activity; trac #6250
Erik Garrison wrote: 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. Did you try to enter a new url or hit reload when you are connected again? This works fine for me. And I can access local pages fine as well. Best, Simon ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
[sugar] [PATCH] to Browse activity; trac #6250
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 [EMAIL PROTECTED] 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) -- 1.5.4.3 From 9e3c4d01dc2b368ef0636cce598dd655446fb883 Mon Sep 17 00:00:00 2001 From: Erik Garrison [EMAIL PROTECTED] 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) -- 1.5.4.3 ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar