# HG changeset patch # User Eugene Ostroukhov # Date 1269646950 25200 # Node ID bf9d8e184dd08fe24a6fa402e7df736f2913f63e # Parent 5a06888861c3028e6cb4f6edaba069a28fa94ca3 Offline mode support on Mac was fixed diff -r 5a06888861c3 -r bf9d8e184dd0 org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/MozillaPreviewPage.java --- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/MozillaPreviewPage.java Fri Mar 26 10:25:30 2010 -0700 +++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/MozillaPreviewPage.java Fri Mar 26 16:42:30 2010 -0700 @@ -12,6 +12,8 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.browser.Browser; import org.eclipse.swt.widgets.Composite; +import org.mozilla.interfaces.nsIIOService; +import org.mozilla.interfaces.nsIIOService2; import org.mozilla.interfaces.nsIPrefBranch; import org.mozilla.interfaces.nsIServiceManager; import org.mozilla.xpcom.Mozilla; @@ -97,6 +99,7 @@ // Mozilla. We don't want to pollute the error log with this return; } + mozillaPrefs = (nsIPrefBranch) servMgr.getServiceByContractID( "@mozilla.org/preferences-service;1", @@ -137,6 +140,14 @@ String location = "http://" + WebappManager.getHost() + ":" + WebappManager.getPort(); mozillaPrefs.setCharPref("capability.principal.codebase.p0.id", location); mozillaPrefs.setBoolPref("security.fileuri.strict_origin_policy", 0); + // start JavaXPCOM section + nsIIOService ioService = + (nsIIOService)servMgr.getServiceByContractID("@mozilla.org/network/io-service;1", nsIIOService.NS_IIOSERVICE_IID); + nsIIOService2 ioService2 = + (nsIIOService2)ioService.queryInterface(nsIIOService2.NS_IIOSERVICE2_IID); + ioService2.setManageOfflineStatus(false); + ioService.setOffline(false); + // end JavaXPCOM section } catch (Exception e) { PreviewerPlugin.log("Error getting preferences", e); } diff -r 5a06888861c3 -r bf9d8e184dd0 org.symbian.tools.wrttools.product/launch/WRT IDE Product (Mac OS X).launch --- a/org.symbian.tools.wrttools.product/launch/WRT IDE Product (Mac OS X).launch Fri Mar 26 10:25:30 2010 -0700 +++ b/org.symbian.tools.wrttools.product/launch/WRT IDE Product (Mac OS X).launch Fri Mar 26 16:42:30 2010 -0700 @@ -1,4 +1,4 @@ - +