diff options
Diffstat (limited to 'application/palemoon/base/content')
-rw-r--r-- | application/palemoon/base/content/baseMenuOverlay.xul | 14 | ||||
-rw-r--r-- | application/palemoon/base/content/browser-appmenu.inc | 13 | ||||
-rw-r--r-- | application/palemoon/base/content/browser.js | 5 | ||||
-rw-r--r-- | application/palemoon/base/content/tabbrowser.xml | 17 | ||||
-rw-r--r-- | application/palemoon/base/content/utilityOverlay.js | 55 |
5 files changed, 82 insertions, 22 deletions
diff --git a/application/palemoon/base/content/baseMenuOverlay.xul b/application/palemoon/base/content/baseMenuOverlay.xul index a006ed5c6..bccdec265 100644 --- a/application/palemoon/base/content/baseMenuOverlay.xul +++ b/application/palemoon/base/content/baseMenuOverlay.xul @@ -57,15 +57,21 @@ label="&helpTroubleshootingInfo.label;" oncommand="openTroubleshootingPage()" onclick="checkForMiddleClick(this, event);"/> + <menuitem id="helpSafeMode" + accesskey="&helpSafeMode.accesskey;" + label="&helpSafeMode.label;" + oncommand="restart(true);"/> + <menuseparator/> + <menuitem id="releaseNotes" + accesskey="&helpReleaseNotes.accesskey;" + label="&helpReleaseNotes.label;" + oncommand="openReleaseNotes();" + onclick="checkForMiddleClick(this, event);"/> <menuitem id="feedbackPage" accesskey="&helpFeedbackPage.accesskey;" label="&helpFeedbackPage.label;" oncommand="openFeedbackPage()" onclick="checkForMiddleClick(this, event);"/> - <menuitem id="helpSafeMode" - accesskey="&helpSafeMode.accesskey;" - label="&helpSafeMode.label;" - oncommand="restart(true);"/> <menuseparator id="updatesSeparator"/> <menuitem id="checkForUpdates" class="menuitem-iconic" #ifdef MOZ_UPDATER diff --git a/application/palemoon/base/content/browser-appmenu.inc b/application/palemoon/base/content/browser-appmenu.inc index ffb117a60..9d202c965 100644 --- a/application/palemoon/base/content/browser-appmenu.inc +++ b/application/palemoon/base/content/browser-appmenu.inc @@ -350,14 +350,19 @@ label="&helpTroubleshootingInfo.label;" oncommand="openTroubleshootingPage()" onclick="checkForMiddleClick(this,event);"/> + <menuitem id="appmenu_safeMode" + label="&appMenuSafeMode.label;" + oncommand="restart(true);"/> + <menuseparator/> + <menuitem id="appmenu_releaseNotes" + accesskey="&helpReleaseNotes.accesskey;" + label="&helpReleaseNotes.label;" + oncommand="openReleaseNotes();" + onclick="checkForMiddleClick(this, event);"/> <menuitem id="appmenu_feedbackPage" label="&helpFeedbackPage.label;" oncommand="openFeedbackPage()" onclick="checkForMiddleClick(this, event);"/> - <menuseparator/> - <menuitem id="appmenu_safeMode" - label="&appMenuSafeMode.label;" - oncommand="restart(true);"/> #ifdef MOZ_UPDATER <menuseparator/> <menuitem id="appmenu_checkForUpdates" diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js index 7672fa3a8..3f8a584bf 100644 --- a/application/palemoon/base/content/browser.js +++ b/application/palemoon/base/content/browser.js @@ -412,6 +412,10 @@ var gURLBarSettings = { }, writePlaceholder: function() { + if (!gURLBar) { + return; + } + let attribute = "placeholder"; let prefs = this.prefSuggests.map(pref => { return this.prefSuggest + pref; @@ -3471,6 +3475,7 @@ function BrowserToolboxCustomizeDone(aToolboxChanged) { // Update the urlbar if (gURLBar) { + gURLBarSettings.writePlaceholder(); URLBarSetURI(); XULBrowserWindow.asyncUpdateUI(); BookmarkingUI.updateStarState(); diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml index d9366f488..aa1a89200 100644 --- a/application/palemoon/base/content/tabbrowser.xml +++ b/application/palemoon/base/content/tabbrowser.xml @@ -402,11 +402,18 @@ let promptBox = { appendPrompt : function(args, onCloseCallback) { let newPrompt = document.createElementNS(XUL_NS, "tabmodalprompt"); - stack.appendChild(newPrompt); + // stack.appendChild(newPrompt); + stack.insertBefore(newPrompt, browser.nextSibling); browser.setAttribute("tabmodalPromptShowing", true); newPrompt.clientTop; // style flush to assure binding is attached + let prompts = this.listPrompts(); + if (prompts.length > 1) { + // Let's hide ourself behind the current prompt. + newPrompt.hidden = true; + } + let tab = self._getTabForContentWindow(browser.contentWindow); newPrompt.init(args, tab, onCloseCallback); return newPrompt; @@ -418,6 +425,7 @@ let prompts = this.listPrompts(); if (prompts.length) { let prompt = prompts[prompts.length - 1]; + prompt.hidden = false; prompt.Dialog.setDefaultFocus(); } else { browser.removeAttribute("tabmodalPromptShowing"); @@ -823,13 +831,8 @@ } let sizedIconUrl = browser.mIconURL || ""; - if (sizedIconUrl) { - let size = Math.round(16 * window.devicePixelRatio); - sizedIconUrl += (sizedIconUrl.includes("#") ? "&" : "#") + - "-moz-resolution=" + size + "," + size; - } if (sizedIconUrl != aTab.getAttribute("image")) { - if (browser.mIconURL) + if (sizedIconUrl) aTab.setAttribute("image", sizedIconUrl); else aTab.removeAttribute("image"); diff --git a/application/palemoon/base/content/utilityOverlay.js b/application/palemoon/base/content/utilityOverlay.js index c2a8baeed..d7c8088c7 100644 --- a/application/palemoon/base/content/utilityOverlay.js +++ b/application/palemoon/base/content/utilityOverlay.js @@ -12,6 +12,9 @@ Components.utils.import("resource:///modules/RecentWindow.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "ShellService", "resource:///modules/ShellService.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "Deprecated", + "resource://gre/modules/Deprecated.jsm"); + XPCOMUtils.defineLazyGetter(this, "BROWSER_NEW_TAB_URL", function () { const PREF = "browser.newtab.url"; @@ -57,6 +60,14 @@ function getBrowserURL() return "chrome://browser/content/browser.xul"; } +function getBoolPref(pref, defaultValue) { + Deprecated.warning("getBoolPref is deprecated and will be removed in a future release. " + + "You should use Services.pref.getBoolPref (Services.jsm).", + "https://github.com/MoonchildProductions/UXP/issues/989"); + return Services.prefs.getBoolPref(pref, defaultValue); +} + + function getTopWin(skipPopups) { // If this is called in a browser window, use that window regardless of // whether it's the frontmost window, since commands can be executed in @@ -573,10 +584,16 @@ function buildHelpMenu() var checkForUpdates = document.getElementById("checkForUpdates"); var appMenuCheckForUpdates = document.getElementById("appmenu_checkForUpdates"); var canCheckForUpdates = updates.canCheckForUpdates; + checkForUpdates.setAttribute("disabled", !canCheckForUpdates); - appMenuCheckForUpdates.setAttribute("disabled", !canCheckForUpdates); - if (!canCheckForUpdates) + + if (appMenuCheckForUpdates) { + appMenuCheckForUpdates.setAttribute("disabled", !canCheckForUpdates); + } + + if (!canCheckForUpdates) { return; + } var strings = document.getElementById("bundle_browser"); var activeUpdate = um.activeUpdate; @@ -612,19 +629,31 @@ function buildHelpMenu() } checkForUpdates.label = getStringWithUpdateName("updatesItem_" + key); - appMenuCheckForUpdates.label = getStringWithUpdateName("updatesItem_" + key); + + if (appMenuCheckForUpdates) { + appMenuCheckForUpdates.label = getStringWithUpdateName("updatesItem_" + key); + } + // updatesItem_default.accesskey, updatesItem_downloading.accesskey, // updatesItem_resume.accesskey or updatesItem_pending.accesskey checkForUpdates.accessKey = strings.getString("updatesItem_" + key + ".accesskey"); - appMenuCheckForUpdates.accessKey = strings.getString("updatesItem_" + key + - ".accesskey"); + + if (appMenuCheckForUpdates) { + appMenuCheckForUpdates.accessKey = strings.getString("updatesItem_" + key + + ".accesskey"); + } + if (um.activeUpdate && updates.isDownloading) { checkForUpdates.setAttribute("loading", "true"); - appMenuCheckForUpdates.setAttribute("loading", "true"); + if (appMenuCheckForUpdates) { + appMenuCheckForUpdates.setAttribute("loading", "true"); + } } else { checkForUpdates.removeAttribute("loading"); - appMenuCheckForUpdates.removeAttribute("loading"); + if (appMenuCheckForUpdates) { + appMenuCheckForUpdates.removeAttribute("loading"); + } } #else #ifndef XP_MACOSX @@ -692,6 +721,18 @@ function openAdvancedPreferences(tabID) } /** + * Opens the release notes page for this version of the application. + */ +function openReleaseNotes() +{ + var relnotesURL = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"] + .getService(Components.interfaces.nsIURLFormatter) + .formatURLPref("app.releaseNotesURL"); + + openUILinkIn(relnotesURL, "tab"); +} + +/** * Opens the troubleshooting information (about:support) page for this version * of the application. */ |