mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1021831 - Show "Validation status" tooltip over the status circle in WebIDE. r=paul
This commit is contained in:
parent
eac07cd035
commit
20c12fc908
@ -6,6 +6,8 @@ const promise = require("projecteditor/helpers/promise");
|
||||
var { registerPlugin, Plugin } = require("projecteditor/plugins/core");
|
||||
const { AppProjectEditor } = require("./app-project-editor");
|
||||
const OPTION_URL = "chrome://browser/skin/devtools/tool-options.svg";
|
||||
const {Services} = Cu.import("resource://gre/modules/Services.jsm");
|
||||
const Strings = Services.strings.createBundle("chrome://browser/locale/devtools/webide.properties");
|
||||
|
||||
var AppManagerRenderer = Class({
|
||||
extends: Plugin,
|
||||
@ -59,10 +61,13 @@ var AppManagerRenderer = Class({
|
||||
let name = appManagerOpts.name || resource.basename;
|
||||
let url = appManagerOpts.iconUrl || "icon-sample.png";
|
||||
let status = appManagerOpts.validationStatus || "unknown";
|
||||
let tooltip = Strings.formatStringFromName("status_tooltip",
|
||||
[Strings.GetStringFromName("status_" + status)], 1);
|
||||
|
||||
nameLabel.textContent = name;
|
||||
image.setAttribute("src", url);
|
||||
statusElement.setAttribute("status", status);
|
||||
statusElement.setAttribute("tooltiptext", tooltip);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -56,3 +56,10 @@ runtimedetails_checkno=no
|
||||
runtimedetails_checkyes=yes
|
||||
runtimedetails_checkunkown=unknown
|
||||
runtimedetails_notUSBDevice=Not a USB device
|
||||
|
||||
# Validation status
|
||||
status_tooltip=Validation status: %1$S
|
||||
status_valid=VALID
|
||||
status_warning=WARNINGS
|
||||
status_error=ERRORS
|
||||
status_unknown=UNKNOWN
|
||||
|
Loading…
Reference in New Issue
Block a user