diff --git a/interface/resources/qml/Web3DSurface.qml b/interface/resources/qml/Web3DSurface.qml
index ff574ceaa5..3340226761 100644
--- a/interface/resources/qml/Web3DSurface.qml
+++ b/interface/resources/qml/Web3DSurface.qml
@@ -33,6 +33,12 @@ Item {
property var item: null
function load(url, scriptUrl) {
+ // Ensure we reset any existing item to "about:blank" to ensure web audio stops: DEV-2375
+ if (root.item != null) {
+ root.item.url = "about:blank"
+ root.item.destroy()
+ root.item = null
+ }
QmlSurface.load("./controls/WebView.qml", root, function(newItem) {
root.item = newItem
root.item.url = url
diff --git a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml
index 03fbbb178e..85e5211649 100644
--- a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml
+++ b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml
@@ -580,8 +580,9 @@ Rectangle {
sendToScript(msg);
} else if (msg.method === "showInvalidatedLightbox") {
lightboxPopup.titleText = "Item Invalidated";
- lightboxPopup.bodyText = 'Your item is marked "invalidated" because this item has been suspended ' +
- "from the Marketplace due to a claim against its author.";
+ lightboxPopup.bodyText = 'This item has been invalidated and is no longer available.
' +
+ 'If you have questions, please contact marketplace@highfidelity.com.
' +
+ 'Thank you!';
lightboxPopup.button1text = "CLOSE";
lightboxPopup.button1method = function() {
lightboxPopup.visible = false;
diff --git a/libraries/ui/src/ui/ToolbarScriptingInterface.h b/libraries/ui/src/ui/ToolbarScriptingInterface.h
index 952d3cce95..3d38aa296b 100644
--- a/libraries/ui/src/ui/ToolbarScriptingInterface.h
+++ b/libraries/ui/src/ui/ToolbarScriptingInterface.h
@@ -92,15 +92,19 @@ public:
ToolbarProxy(QObject* qmlObject, QObject* parent = nullptr);
/**jsdoc
+ * Currently doesn't work.
* @function ToolbarProxy#addButton
- * @param {object} properties
- * @returns {ToolbarButtonProxy}
+ * @param {object} properties - Button properties
+ * @returns {object} The button added.
+ * @deprecated This method is deprecated and will be removed.
*/
Q_INVOKABLE ToolbarButtonProxy* addButton(const QVariant& properties);
/**jsdoc
+ * Currently doesn't work.
* @function ToolbarProxy#removeButton
- * @param {string} name
+ * @param {string} name - Button name.
+ * @deprecated This method is deprecated and will be removed.
*/
Q_INVOKABLE void removeButton(const QVariant& name);
diff --git a/scripts/developer/tests/toolbarTest.js b/scripts/developer/tests/toolbarTest.js
index 89609e610d..9e82f814ac 100644
--- a/scripts/developer/tests/toolbarTest.js
+++ b/scripts/developer/tests/toolbarTest.js
@@ -1,117 +1,38 @@
-var isActive = false;
+(function () {
-var toolBar = (function() {
- var that = {},
- toolBar,
- activeButton,
- newModelButton,
- newShapeButton,
- newLightButton,
- newTextButton,
- newWebButton,
- newZoneButton,
- newParticleButton,
- newMaterialButton
-
- var toolIconUrl = Script.resolvePath("../../system/assets/images/tools/");
-
- function initialize() {
- print("Toolbars: " + Toolbars);
- toolBar = Toolbars.getToolbar("highfidelity.edit.toolbar");
- print("Toolbar: " + toolBar);
- activeButton = toolBar.addButton({
- objectName: "activeButton",
- imageURL: toolIconUrl + "edit-01.svg",
- visible: true,
- alpha: 0.9,
- });
-
- print("Button " + activeButton);
- print("Button signal " + activeButton.clicked);
- activeButton.clicked.connect(function(){
- print("Clicked on button " + isActive);
- that.setActive(!isActive);
- });
-
- newModelButton = toolBar.addButton({
- objectName: "newModelButton",
- imageURL: toolIconUrl + "model-01.svg",
- alpha: 0.9,
- visible: false
- });
-
- newShapeButton = toolBar.addButton({
- objectName: "newShapeButton",
- imageURL: toolIconUrl + "cube-01.svg",
- alpha: 0.9,
- visible: false
- });
-
- newLightButton = toolBar.addButton({
- objectName: "newLightButton",
- imageURL: toolIconUrl + "light-01.svg",
- alpha: 0.9,
- visible: false
- });
-
- newTextButton = toolBar.addButton({
- objectName: "newTextButton",
- imageURL: toolIconUrl + "text-01.svg",
- alpha: 0.9,
- visible: false
- });
-
- newWebButton = toolBar.addButton({
- objectName: "newWebButton",
- imageURL: toolIconUrl + "web-01.svg",
- alpha: 0.9,
- visible: false
- });
-
- newZoneButton = toolBar.addButton({
- objectName: "newZoneButton",
- imageURL: toolIconUrl + "zone-01.svg",
- alpha: 0.9,
- visible: false
- });
-
- newParticleButton = toolBar.addButton({
- objectName: "newParticleButton",
- imageURL: toolIconUrl + "particle-01.svg",
- alpha: 0.9,
- visible: false
- });
-
- newMaterialButton = toolBar.addButton({
- objectName: "newMaterialButton",
- imageURL: toolIconUrl + "material-01.svg",
- alpha: 0.9,
- visible: false
- });
-
- that.setActive(false);
- newModelButton.clicked();
+ // Get the system toolbar.
+ var toolbar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system");
+ if (!toolbar) {
+ print("ERROR: Couldn't get system toolbar.");
+ return;
}
- that.setActive = function(active) {
- if (active != isActive) {
- isActive = active;
- that.showTools(isActive);
- }
- };
+ Script.setTimeout(function () {
+ // Report the system toolbar visibility.
+ var isToolbarVisible = toolbar.readProperty("visible");
+ print("Toolbar visible: " + isToolbarVisible);
- // Sets visibility of tool buttons, excluding the power button
- that.showTools = function(doShow) {
- newModelButton.writeProperty('visible', doShow);
- newShapeButton.writeProperty('visible', doShow);
- newLightButton.writeProperty('visible', doShow);
- newTextButton.writeProperty('visible', doShow);
- newWebButton.writeProperty('visible', doShow);
- newZoneButton.writeProperty('visible', doShow);
- newParticleButton.writeProperty('visible', doShow);
- newMaterialButton.writeProperty('visible', doShow);
- };
+ // Briefly toggle the system toolbar visibility.
+ print("Toggle toolbar");
+ toolbar.writeProperty("visible", !isToolbarVisible);
+ Script.setTimeout(function () {
+ print("Toggle toolbar");
+ toolbar.writeProperty("visible", isToolbarVisible);
+ }, 2000);
+ }, 2000);
+
+ Script.setTimeout(function () {
+ // Report the system toolbar visibility alternative method.
+ isToolbarVisible = toolbar.readProperties(["visible"]).visible;
+ print("Toolbar visible: " + isToolbarVisible);
+
+ // Briefly toggle the system toolbar visibility.
+ print("Toggle toolbar");
+ toolbar.writeProperties({ visible: !isToolbarVisible });
+ Script.setTimeout(function () {
+ print("Toggle toolbar");
+ toolbar.writeProperties({ visible: isToolbarVisible });
+ }, 2000);
+ }, 6000);
- initialize();
- return that;
}());