mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 00:08:39 +09:00
[Basilisk] Issue #67 - begin porting over changes to stop using appconstants
This commit is contained in:
parent
a03283044e
commit
e1e2d7e832
3 changed files with 22 additions and 21 deletions
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
// Services = object with smart getters for common XPCOM services
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Components.utils.import("resource://gre/modules/AppConstants.jsm");
|
||||
|
||||
function init(aEvent)
|
||||
{
|
||||
|
|
@ -69,30 +68,29 @@ function init(aEvent)
|
|||
let arch = bundle.GetStringFromName(archResource);
|
||||
versionField.textContent += ` (${arch})`;
|
||||
|
||||
// TODO: when we get rid of appconstants make this check for Unix and not MacOS
|
||||
if (AppConstants.platform == "linux") {
|
||||
// If Linux append the toolkit "(GTK2)" or "(GTK3)"
|
||||
let toolkit = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).widgetToolkit.toUpperCase();
|
||||
versionField.textContent += ` (${toolkit})`;
|
||||
}
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
// If Linux append the toolkit "(GTK2)" or "(GTK3)"
|
||||
let toolkit = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).widgetToolkit.toUpperCase();
|
||||
versionField.textContent += ` (${toolkit})`;
|
||||
#endif
|
||||
|
||||
// Get Release Notes URL from Preferences
|
||||
let releaseNotesURL = Services.prefs.getCharPref("app.releaseNotesURL");
|
||||
document.getElementById("releasenotes").setAttribute("href", releaseNotesURL);
|
||||
|
||||
if (AppConstants.MOZ_UPDATER) {
|
||||
gAppUpdater = new appUpdater();
|
||||
#ifdef MOZ_UPDATER
|
||||
gAppUpdater = new appUpdater();
|
||||
|
||||
let channelLabel = document.getElementById("currentChannel");
|
||||
let currentChannelText = document.getElementById("currentChannelText");
|
||||
channelLabel.value = UpdateUtils.UpdateChannel;
|
||||
if (/^release($|\-)/.test(channelLabel.value))
|
||||
currentChannelText.hidden = true;
|
||||
}
|
||||
let channelLabel = document.getElementById("currentChannel");
|
||||
let currentChannelText = document.getElementById("currentChannelText");
|
||||
channelLabel.value = UpdateUtils.UpdateChannel;
|
||||
if (/^release($|\-)/.test(channelLabel.value))
|
||||
currentChannelText.hidden = true;
|
||||
#endif
|
||||
|
||||
if (AppConstants.platform == "macosx") {
|
||||
// it may not be sized at this point, and we need its width to calculate its position
|
||||
window.sizeToContent();
|
||||
window.moveTo((screen.availWidth / 2) - (window.outerWidth / 2), screen.availHeight / 5);
|
||||
}
|
||||
#ifdef XP_MACOSX
|
||||
// it may not be sized at this point, and we need its width to calculate its position
|
||||
window.sizeToContent();
|
||||
window.moveTo((screen.availWidth / 2) - (window.outerWidth / 2), screen.availHeight / 5);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,9 +14,11 @@ browser.jar:
|
|||
% overlay chrome://global/content/viewSource.xul chrome://browser/content/viewSourceOverlay.xul
|
||||
% overlay chrome://global/content/viewPartialSource.xul chrome://browser/content/viewSourceOverlay.xul
|
||||
|
||||
#ifdef MOZ_UPDATER
|
||||
content/browser/aboutDialog-appUpdater.js (content/aboutDialog-appUpdater.js)
|
||||
#endif
|
||||
* content/browser/aboutDialog.xul (content/aboutDialog.xul)
|
||||
content/browser/aboutDialog.js (content/aboutDialog.js)
|
||||
* content/browser/aboutDialog.js (content/aboutDialog.js)
|
||||
content/browser/aboutDialog.css (content/aboutDialog.css)
|
||||
* content/browser/abouthome/aboutHome.xhtml (content/abouthome/aboutHome.xhtml)
|
||||
content/browser/abouthome/aboutHome.js (content/abouthome/aboutHome.js)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
DEFINES['MOZ_APP_NAME'] = CONFIG['MOZ_APP_NAME']
|
||||
DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
|
||||
DEFINES['MOZ_APP_VERSION_DISPLAY'] = CONFIG['MOZ_APP_VERSION_DISPLAY']
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue