Bug 1021831 - Show "Validation status" tooltip over the status circle in WebIDE. r=paul

This commit is contained in:
Jan Keromnes 2014-08-12 07:23:00 -04:00
parent eac07cd035
commit 20c12fc908
2 changed files with 12 additions and 0 deletions

View File

@ -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;
}

View File

@ -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