diff options
author | Christopher Aillon <caillon@fedoraproject.org> | 2007-12-13 14:38:04 +0000 |
---|---|---|
committer | Christopher Aillon <caillon@fedoraproject.org> | 2007-12-13 14:38:04 +0000 |
commit | 8bebccad42c5a57ea2e1a40048302c2893244adf (patch) | |
tree | 17e358007cd6b9a5f8008720881c8a6bcfe833e1 /firefox-2.0-getstartpage.patch | |
parent | Add LICENSE to %doc (diff) | |
download | librewolf-fedora-ff-8bebccad42c5a57ea2e1a40048302c2893244adf.tar.gz librewolf-fedora-ff-8bebccad42c5a57ea2e1a40048302c2893244adf.tar.bz2 librewolf-fedora-ff-8bebccad42c5a57ea2e1a40048302c2893244adf.zip |
- Fix the getStartPage method to not return blank. Patch by
pspencer@fields.utoronto.ca
Diffstat (limited to 'firefox-2.0-getstartpage.patch')
-rw-r--r-- | firefox-2.0-getstartpage.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/firefox-2.0-getstartpage.patch b/firefox-2.0-getstartpage.patch new file mode 100644 index 0000000..450d9c3 --- /dev/null +++ b/firefox-2.0-getstartpage.patch @@ -0,0 +1,40 @@ +Index: mozilla/browser/components/nsBrowserContentHandler.js +=================================================================== +RCS file: /cvsroot/mozilla/browser/components/nsBrowserContentHandler.js,v +retrieving revision 1.12.2.23 +diff -d -u -p -r1.12.2.23 nsBrowserContentHandler.js +--- mozilla/browser/components/nsBrowserContentHandler.js 14 Sep 2007 19:59:42 -0000 1.12.2.23 ++++ mozilla/browser/components/nsBrowserContentHandler.js 13 Dec 2007 13:20:44 -0000 +@@ -542,18 +542,14 @@ var nsBrowserContentHandler = { + }, + + get startPage() { ++ var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"] ++ .getService(Components.interfaces.nsIURLFormatter); ++ + var prefb = Components.classes["@mozilla.org/preferences-service;1"] + .getService(nsIPrefBranch); + +- var uri = prefb.getComplexValue("browser.startup.homepage", +- nsIPrefLocalizedString).data; ++ var uri = formatter.formatURLPref("browser.startup.homepage"); + +- if (!uri) { +- prefb.clearUserPref("browser.startup.homepage"); +- uri = prefb.getComplexValue("browser.startup.homepage", +- nsIPrefLocalizedString).data; +- } +- + var count; + try { + count = prefb.getIntPref("browser.startup.homepage.count"); +@@ -564,8 +560,7 @@ var nsBrowserContentHandler = { + + for (var i = 1; i < count; ++i) { + try { +- var page = prefb.getComplexValue("browser.startup.homepage." + i, +- nsIPrefLocalizedString).data; ++ var page = formatter.formatURLPref("browser.startup.homepage." + i); + uri += "\n" + page; + } + catch (e) { |