remove dead code, use stop index

This commit is contained in:
Stephen Birarda 2015-12-30 09:45:23 -08:00
parent 9065a49d05
commit a8896de140
2 changed files with 7 additions and 9 deletions

View file

@ -87,6 +87,7 @@ var homeServer = null;
const GO_HOME_INDEX = 0;
const SERVER_LABEL_INDEX = 2;
const RESTART_INDEX = 3;
const STOP_INDEX = 4;
const SETTINGS_INDEX = 5;
function buildMenuArray(serverState) {
@ -147,7 +148,7 @@ function updateMenuArray(menuArray, serverState) {
menuArray[GO_HOME_INDEX].enabled = running;
// Stop is only visible if running
menuArray[RESTART_INDEX + 1].visible = running;
menuArray[STOP_INDEX].visible = running;
// Settings is only visible if running
menuArray[SETTINGS_INDEX].enabled = running;

View file

@ -51,9 +51,6 @@ int main(int argc, const char* argv[]) {
static const int LOCAL_SERVER_TIMEOUT_MS = 500;
QElapsedTimer waitingTimer;
waitingTimer.start();
// Try to connect - if we can't connect, interface has probably just gone down
if (socket.waitForConnected(LOCAL_SERVER_TIMEOUT_MS)) {