c535134760
http://www.mozillamessaging.com/en-US/thunderbird/3.0.4/releasenotes/ Backing up your profile before upgrading is recommended.. Update largely based on www/firefox35 port, tested on i386/amd64/sparc64/powerpc by myself and alpha by naddy@. ok naddy@
95 lines
4.0 KiB
Plaintext
95 lines
4.0 KiB
Plaintext
$OpenBSD: patch-mozilla_browser_components_nsBrowserGlue_js,v 1.1 2010/04/03 09:26:46 landry Exp $
|
|
--- mozilla/browser/components/nsBrowserGlue.js.orig Mon Jan 11 18:42:36 2010
|
|
+++ mozilla/browser/components/nsBrowserGlue.js Sat Jan 23 12:42:26 2010
|
|
@@ -267,10 +267,6 @@ BrowserGlue.prototype = {
|
|
// Browser startup complete. All initial windows have opened.
|
|
_onBrowserStartup: function()
|
|
{
|
|
- // Show about:rights notification, if needed.
|
|
- if (this._shouldShowRights())
|
|
- this._showRightsNotification();
|
|
-
|
|
// If new add-ons were installed during startup open the add-ons manager.
|
|
if (this._prefs.prefHasUserValue(PREF_EM_NEW_ADDONS_LIST)) {
|
|
var args = Cc["@mozilla.org/supports-array;1"].
|
|
@@ -416,79 +412,6 @@ BrowserGlue.prototype = {
|
|
}
|
|
break;
|
|
}
|
|
- },
|
|
-
|
|
- /*
|
|
- * _shouldShowRights - Determines if the user should be shown the
|
|
- * about:rights notification. The notification should *not* be shown if
|
|
- * we've already shown the current version, or if the override pref says to
|
|
- * never show it. The notification *should* be shown if it's never been seen
|
|
- * before, if a newer version is available, or if the override pref says to
|
|
- * always show it.
|
|
- */
|
|
- _shouldShowRights : function () {
|
|
- // Look for an unconditional override pref. If set, do what it says.
|
|
- // (true --> never show, false --> always show)
|
|
- try {
|
|
- return !this._prefs.getBoolPref("browser.rights.override");
|
|
- } catch (e) { }
|
|
- // Ditto, for the legacy EULA pref.
|
|
- try {
|
|
- return !this._prefs.getBoolPref("browser.EULA.override");
|
|
- } catch (e) { }
|
|
-
|
|
-#ifndef OFFICIAL_BUILD
|
|
- // Non-official builds shouldn't shouldn't show the notification.
|
|
- return false;
|
|
-#endif
|
|
-
|
|
- // Look to see if the user has seen the current version or not.
|
|
- var currentVersion = this._prefs.getIntPref("browser.rights.version");
|
|
- try {
|
|
- return !this._prefs.getBoolPref("browser.rights." + currentVersion + ".shown");
|
|
- } catch (e) { }
|
|
-
|
|
- // Legacy: If the user accepted a EULA, we won't annoy them with the
|
|
- // equivalent about:rights page until the version changes.
|
|
- try {
|
|
- return !this._prefs.getBoolPref("browser.EULA." + currentVersion + ".accepted");
|
|
- } catch (e) { }
|
|
-
|
|
- // We haven't shown the notification before, so do so now.
|
|
- return true;
|
|
- },
|
|
-
|
|
- _showRightsNotification : function () {
|
|
- // Stick the notification onto the selected tab of the active browser window.
|
|
- var win = this.getMostRecentBrowserWindow();
|
|
- var browser = win.gBrowser; // for closure in notification bar callback
|
|
- var notifyBox = browser.getNotificationBox();
|
|
-
|
|
- var brandBundle = this._bundleService.createBundle("chrome://branding/locale/brand.properties");
|
|
- var rightsBundle = this._bundleService.createBundle("chrome://browser/locale/aboutRights.properties");
|
|
-
|
|
- var buttonLabel = rightsBundle.GetStringFromName("buttonLabel");
|
|
- var buttonAccessKey = rightsBundle.GetStringFromName("buttonAccessKey");
|
|
- var productName = brandBundle.GetStringFromName("brandFullName");
|
|
- var notifyRightsText = rightsBundle.formatStringFromName("notifyRightsText", [productName], 1);
|
|
-
|
|
- var buttons = [
|
|
- {
|
|
- label: buttonLabel,
|
|
- accessKey: buttonAccessKey,
|
|
- popup: null,
|
|
- callback: function(aNotificationBar, aButton) {
|
|
- browser.selectedTab = browser.addTab("about:rights");
|
|
- }
|
|
- }
|
|
- ];
|
|
-
|
|
- // Set pref to indicate we've shown the notification.
|
|
- var currentVersion = this._prefs.getIntPref("browser.rights.version");
|
|
- this._prefs.setBoolPref("browser.rights." + currentVersion + ".shown", true);
|
|
-
|
|
- var box = notifyBox.appendNotification(notifyRightsText, "about-rights", null, notifyBox.PRIORITY_INFO_LOW, buttons);
|
|
- box.persistence = 3; // arbitrary number, just so bar sticks around for a bit
|
|
},
|
|
|
|
// returns the (cached) Sanitizer constructor
|