Merge lp:~pitti/ubufox/default-homepage-override into lp:ubufox

Proposed by Martin Pitt
Status: Merged
Merged at revision: 237
Proposed branch: lp:~pitti/ubufox/default-homepage-override
Merge into: lp:ubufox
Diff against target: 18 lines (+7/-1)
1 file modified
components/aboutStartpage.js (+7/-1)
To merge this branch: bzr merge lp:~pitti/ubufox/default-homepage-override
Reviewer Review Type Date Requested Status
Chris Coulson Approve
Review via email: mp+63121@code.launchpad.net

Description of the change

Allow defaults packages to set their own homepage in distribution.ini

To post a comment you must log in.
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thanks, will merge this now

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components/aboutStartpage.js'
2--- components/aboutStartpage.js 2011-04-08 18:50:30 +0000
3+++ components/aboutStartpage.js 2011-06-01 14:31:07 +0000
4@@ -123,7 +123,13 @@
5 if (!getIsOffline()) {
6 let searchEngineName = getCurrentSearchEngineName();
7 let release = Services.prefs.getCharPref("extensions.ubufox@ubuntu.com.release");
8- let uri = HOMEPAGE_ONLINE_PREFIX + release + "/" + searchEngineName + "/";
9+ var uri;
10+ // allow defaults packages to overwrite the homepage
11+ try {
12+ uri = Services.prefs.getCharPref("extensions.ubufox@ubuntu.com.custom_homepage");
13+ } catch(e) {
14+ uri = HOMEPAGE_ONLINE_PREFIX + release + "/" + searchEngineName + "/";
15+ }
16 let channel = ios.newChannel(uri, null, null);
17 channel.originalURI = aURI;
18 channel.owner = principal;

Subscribers

People subscribed via source and target branches