- Fix the getStartPage method to not return blank. Patch by

pspencer@fields.utoronto.ca
This commit is contained in:
Christopher Aillon 2007-12-13 14:38:04 +00:00
parent f7521edcc3
commit 8bebccad42
2 changed files with 48 additions and 1 deletions

View File

@ -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) {

View File

@ -12,7 +12,7 @@
Summary: Mozilla Firefox Web browser Summary: Mozilla Firefox Web browser
Name: firefox Name: firefox
Version: 2.0.0.10 Version: 2.0.0.10
Release: 4%{?dist} Release: 5%{?dist}
URL: http://www.mozilla.org/projects/firefox/ URL: http://www.mozilla.org/projects/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+ License: MPLv1.1 or GPLv2+ or LGPLv2+
Group: Applications/Internet Group: Applications/Internet
@ -45,6 +45,7 @@ Patch22: firefox-1.1-default-applications.patch
Patch40: firefox-1.5-bullet-bill.patch Patch40: firefox-1.5-bullet-bill.patch
Patch41: firefox-2.0.0.4-undo-uriloader.patch Patch41: firefox-2.0.0.4-undo-uriloader.patch
Patch42: firefox-1.1-uriloader.patch Patch42: firefox-1.1-uriloader.patch
Patch43: firefox-2.0-getstartpage.patch
# font system fixes # font system fixes
Patch83: firefox-1.5-pango-cursor-position.patch Patch83: firefox-1.5-pango-cursor-position.patch
@ -144,6 +145,7 @@ removed in favor of xulrunner-devel.
%patch40 -p1 -b .bullet-bill %patch40 -p1 -b .bullet-bill
%patch41 -p1 -b .undo-uriloader %patch41 -p1 -b .undo-uriloader
%patch42 -p0 -b .uriloader %patch42 -p0 -b .uriloader
%patch43 -p1 -b .getstartpage
%patch83 -p1 -b .pango-cursor-position %patch83 -p1 -b .pango-cursor-position
%patch84 -p0 -b .pango-printing %patch84 -p0 -b .pango-printing
@ -372,6 +374,7 @@ fi
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
%{__rm} -rf %{mozappdir}/components %{__rm} -rf %{mozappdir}/components
%{__rm} -rf %{mozappdir}/extensions %{__rm} -rf %{mozappdir}/extensions
%{__rm} -rf %{mozappdir}/plugins
fi fi
@ -438,6 +441,10 @@ fi
#--------------------------------------------------------------------- #---------------------------------------------------------------------
%changelog %changelog
* Thu Dec 13 2007 Christopher Aillon <caillon@redhat.com> 2.0.0.10-5
- Fix the getStartPage method to not return blank.
Patch by pspencer@fields.utoronto.ca
* Sun Dec 9 2007 Christopher Aillon <caillon@redhat.com> 2.0.0.10-4 * Sun Dec 9 2007 Christopher Aillon <caillon@redhat.com> 2.0.0.10-4
- Fix up some rpmlint warnings - Fix up some rpmlint warnings
- Use only one pref for the homepage for now - Use only one pref for the homepage for now