From bee6e230aeae32d07d11eedc251e7949298133d2 Mon Sep 17 00:00:00 2001
From: Dante Ruiz <dante@highfidelity.io>
Date: Tue, 20 Dec 2016 18:28:07 +0000
Subject: [PATCH] made requested changes

---
 scripts/system/bubble.js | 7 +++----
 scripts/system/edit.js   | 9 +++------
 scripts/system/goto.js   | 9 ++++-----
 scripts/system/hmd.js    | 4 +++-
 4 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/scripts/system/bubble.js b/scripts/system/bubble.js
index 74f6588366..7880faa934 100644
--- a/scripts/system/bubble.js
+++ b/scripts/system/bubble.js
@@ -91,9 +91,7 @@
 
     // Used to set the state of the bubble HUD button
     function writeButtonProperties(parameter) {
-       var buttonProperties = button.getProperties();
-       buttonProperties.isActive = parameter;
-       button.editProperties(buttonProperties);
+        button.editProperties({isActive: parameter});
     }
 
     // The bubble script's update function
@@ -168,7 +166,8 @@
 
     // Setup the bubble button and add it to the toolbar
     var button = tablet.addButton({
-        text: "BUBBLE"});
+        text: "BUBBLE"
+    });
     onBubbleToggled();
 
     button.clicked.connect(Users.toggleIgnoreRadius);
diff --git a/scripts/system/edit.js b/scripts/system/edit.js
index 7c5ec106f5..63e64ba982 100644
--- a/scripts/system/edit.js
+++ b/scripts/system/edit.js
@@ -170,7 +170,6 @@ var toolBar = (function () {
     var EDIT_SETTING = "io.highfidelity.isEditting"; // for communication with other scripts
     var that = {},
         toolBar,
-        systemToolbar,
         activeButton,
         tablet;
 
@@ -231,11 +230,11 @@ var toolBar = (function () {
             }
         });
 
-        systemToolbar = Toolbars.getToolbar(SYSTEM_TOOLBAR);
+
         tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
         activeButton = tablet.addButton({
             text: "EDIT"
-            });
+        });
 
         activeButton.clicked.connect(function() {
             that.toggle();
@@ -437,9 +436,7 @@ var toolBar = (function () {
 
     that.toggle = function () {
         that.setActive(!isActive);
-        var buttonProperties = activeButton.getProperties();
-        buttonProperties.isActive = isActive;
-        activeButton.editProperties(buttonProperties);
+        activeButton.editProperties({isActive: isActive});
     };
 
     that.setActive = function (active) {
diff --git a/scripts/system/goto.js b/scripts/system/goto.js
index db027dcb48..62b9dce35b 100644
--- a/scripts/system/goto.js
+++ b/scripts/system/goto.js
@@ -16,20 +16,19 @@
 var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
 var isActive = false
 var button = tablet.addButton({
-    text:"GOTO"})
+    text:"GOTO"
+});
 
 
 function onAddressBarShown(visible) {
 }
 
 function setActive(active) {
-  isActive = active;
+    isActive = active;
 }
 function onClicked(){
     setActive(!isActive);
-    var buttonProperties = button.getProperties();
-    buttonProperties.isActive = isActive;
-    button.editProperties(buttonProperties);
+    button.editProperties({isActive: isActive});
     DialogsManager.toggleAddressBar();
 }
 button.clicked.connect(onClicked);
diff --git a/scripts/system/hmd.js b/scripts/system/hmd.js
index 9cfc18903a..bfe2be7664 100644
--- a/scripts/system/hmd.js
+++ b/scripts/system/hmd.js
@@ -41,6 +41,7 @@ var button;
 // Disable them in hmd.
 var desktopOnlyViews = ['Mirror', 'Independent Mode', 'Entity Mode'];
 function onHmdChanged(isHmd) {
+    //TODO change button icon when the hmd changes
     desktopOnlyViews.forEach(function (view) {
         Menu.setMenuEnabled("View>" + view, !isHmd);
     });
@@ -52,7 +53,8 @@ function onClicked(){
 }
 if (headset) {
     button = tablet.addButton({
-        text: "SWITCH"});
+        text: "SWITCH"
+    });
     onHmdChanged(HMD.active);
 
     button.clicked.connect(onClicked);