mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-05 22:05:40 +00:00
Bug #369109 --> thunderbird release notes url should use the url formatter to get formatted instead of making it a string property. r=axel
This commit is contained in:
parent
6b341f00f5
commit
702bf54014
@ -74,10 +74,10 @@ pref("app.update.vendorName.override", "Mozilla");
|
||||
|
||||
// URL user can browse to manually if for some reason all update installation
|
||||
// attempts fail. TODO: Change this URL
|
||||
pref("app.update.url.manual", "http://www.mozilla.org/products/thunderbird/");
|
||||
pref("app.update.url.manual", "http://%LOCALE%.www.mozilla.com/%LOCALE%/%APP%/");
|
||||
// A default value for the "More information about this update" link
|
||||
// supplied in the "An update is available" page of the update wizard.
|
||||
pref("app.update.url.details", "chrome://messenger-region/locale/region.properties");
|
||||
pref("app.update.url.details", "http://%LOCALE%.www.mozilla.com/%LOCALE%/%APP%/releases/");
|
||||
// User-settable override to app.update.url for testing purposes.
|
||||
//pref("app.update.url.override", "");
|
||||
|
||||
@ -101,6 +101,9 @@ pref("app.update.timer", 600000);
|
||||
// which tells users what's new in this new update.
|
||||
pref("app.update.showInstalledUI", false);
|
||||
|
||||
// Release notes URL
|
||||
pref("app.releaseNotesURL", "http://%LOCALE%.www.mozilla.com/%LOCALE%/%APP%/%VERSION%/releasenotes/");
|
||||
|
||||
// Blocklist preferences
|
||||
pref("extensions.blocklist.enabled", true);
|
||||
pref("extensions.blocklist.interval", 86400);
|
||||
|
@ -249,3 +249,24 @@ function openRegionURL(aResourceName)
|
||||
protocolSvc.loadUrl(uri);
|
||||
} catch (ex) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the url for the passed in pref name, formats it and then loads it in the default
|
||||
* browser.
|
||||
*
|
||||
* @param aPrefName - name of the pref that holds the url we want to format and open
|
||||
*/
|
||||
function openFormattedRegionURL(aPrefName)
|
||||
{
|
||||
var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
|
||||
.getService(Components.interfaces.nsIURLFormatter);
|
||||
var formattedUrl = formatter.formatURLPref(aPrefName);
|
||||
|
||||
var uri = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService)
|
||||
.newURI(formattedUrl, null, null);
|
||||
|
||||
var protocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
|
||||
.getService(Components.interfaces.nsIExternalProtocolService);
|
||||
protocolSvc.loadUrl(uri);
|
||||
}
|
||||
|
@ -1875,9 +1875,9 @@
|
||||
<menupopup id="menu_HelpPopup" onpopupshowing="buildHelpMenu();">
|
||||
#ifdef XP_MACOSX
|
||||
<menuitem id="hintsAndTips" label="&hintsAndTips.label;" key="key_macHelp" oncommand="openRegionURL('mailnews.hints_and_tips.url');"/>
|
||||
<menuitem id="releaseNotes" accesskey="&releaseCmd.accesskey;" label="&releaseCmd.label;" oncommand="openRegionURL('releaseNotesURL');"/>
|
||||
<menuitem id="releaseNotes" accesskey="&releaseCmd.accesskey;" label="&releaseCmd.label;" oncommand="openFormattedRegionURL('app.releaseNotesURL');"/>
|
||||
#else
|
||||
<menuitem id="releaseNotes" accesskey="&releaseCmd.accesskey;" label="&releaseCmd.label;" oncommand="openRegionURL('releaseNotesURL');"/>
|
||||
<menuitem id="releaseNotes" accesskey="&releaseCmd.accesskey;" label="&releaseCmd.label;" oncommand="openFormattedRegionURL('app.releaseNotesURL');"/>
|
||||
<menuitem id="hintsAndTips" accesskey="&hintsAndTips.accesskey;" label="&hintsAndTips.label;" oncommand="openRegionURL('mailnews.hints_and_tips.url');"/>
|
||||
#endif
|
||||
<menuseparator id="menu_HelpAboutSeparator"/>
|
||||
|
@ -485,9 +485,9 @@
|
||||
<menupopup id="menu_HelpPopup">
|
||||
#ifdef XP_MACOSX
|
||||
<menuitem id="hintsAndTips" label="&hintsAndTips.label;" key="key_macHelp" oncommand="openRegionURL('mailnews.hints_and_tips.url');"/>
|
||||
<menuitem id="releaseNotes" accesskey="&releaseCmd.accesskey;" label="&releaseCmd.label;" oncommand="openRegionURL('releaseNotesURL');"/>
|
||||
<menuitem id="releaseNotes" accesskey="&releaseCmd.accesskey;" label="&releaseCmd.label;" oncommand="openFormattedRegionURL('app.releaseNotesURL');"/>
|
||||
#else
|
||||
<menuitem id="releaseNotes" accesskey="&releaseCmd.accesskey;" label="&releaseCmd.label;" oncommand="openRegionURL('releaseNotesURL');"/>
|
||||
<menuitem id="releaseNotes" accesskey="&releaseCmd.accesskey;" label="&releaseCmd.label;" oncommand="openFormattedRegionURL('app.releaseNotesURL');"/>
|
||||
<menuitem id="hintsAndTips" accesskey="&hintsAndTips.accesskey;" label="&hintsAndTips.label;" oncommand="openRegionURL('mailnews.hints_and_tips.url');"/>
|
||||
<menuseparator id="menu_HelpAboutSeparator"/>
|
||||
#endif
|
||||
|
@ -539,9 +539,9 @@
|
||||
<menupopup id="menu_HelpPopup">
|
||||
#ifdef XP_MACOSX
|
||||
<menuitem id="hintsAndTips" label="&hintsAndTips.label;" key="key_macHelp" oncommand="openRegionURL('mailnews.hints_and_tips.url');"/>
|
||||
<menuitem id="releaseNotes" accesskey="&releaseCmd.accesskey;" label="&releaseCmd.label;" oncommand="openRegionURL('releaseNotesURL');"/>
|
||||
<menuitem id="releaseNotes" accesskey="&releaseCmd.accesskey;" label="&releaseCmd.label;" oncommand="openFormattedRegionURL('app.releaseNotesURL');"/>
|
||||
#else
|
||||
<menuitem id="releaseNotes" accesskey="&releaseCmd.accesskey;" label="&releaseCmd.label;" oncommand="openRegionURL('releaseNotesURL');"/>
|
||||
<menuitem id="releaseNotes" accesskey="&releaseCmd.accesskey;" label="&releaseCmd.label;" oncommand="openFormattedRegionURL('app.releaseNotesURL');"/>
|
||||
<menuitem id="hintsAndTips" accesskey="&hintsAndTips.accesskey;" label="&hintsAndTips.label;" oncommand="openRegionURL('mailnews.hints_and_tips.url');"/>
|
||||
<menuseparator id="menu_HelpAboutSeparator"/>
|
||||
#endif
|
||||
|
@ -2,7 +2,6 @@
|
||||
# messenger.properties
|
||||
# mailnews.js
|
||||
mailnews.start_page.url=chrome://messenger/content/start.xhtml
|
||||
releaseNotesURL=http://www.mozilla.org/products/thunderbird/releases/%S.html
|
||||
mailnews.hints_and_tips.url=http://www.mozilla.org/support/thunderbird/
|
||||
|
||||
# To make mapit buttons to disappear in the addressbook, specify empty string. For example:
|
||||
@ -16,6 +15,3 @@ mailnews.hints_and_tips.url=http://www.mozilla.org/support/thunderbird/
|
||||
# @CO == country
|
||||
mail.addr_book.mapit_url.format=http://maps.google.com/maps?q=@A1%20@A2%20@CI%20@ST%20@ZI%20@CO
|
||||
|
||||
# This is the fallback URL for release notes. Do not change this
|
||||
# unless you are providing localized release notes!
|
||||
app.update.url.details=http://www.mozilla.org/products/thunderbird/releases/
|
||||
|
Loading…
x
Reference in New Issue
Block a user