[Basilisk] Report GTK version in about dialog for Linux builds

This commit is contained in:
Basilisk-Dev 2023-10-02 13:15:39 -04:00 committed by roytam1
commit a03283044e

View file

@ -69,6 +69,13 @@ 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})`;
}
// Get Release Notes URL from Preferences
let releaseNotesURL = Services.prefs.getCharPref("app.releaseNotesURL");
document.getElementById("releasenotes").setAttribute("href", releaseNotesURL);