Skip to content

Commit

Permalink
Renamed and moved updateXvpButton
Browse files Browse the repository at this point in the history
  • Loading branch information
samhed committed May 12, 2016
1 parent ab81ddf commit 9e45354
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions include/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ var UI;
try {
UI.rfb = new RFB({'target': $D('noVNC_canvas'),
'onUpdateState': UI.updateState,
'onXvpInit': UI.updateXvpVisualState,
'onXvpInit': UI.updateXvpButton,
'onClipboard': UI.clipReceive,
'onFBUComplete': UI.initialResize,
'onFBResize': UI.updateViewDrag,
Expand Down Expand Up @@ -319,7 +319,7 @@ var UI;
$D('showKeyboard').style.display = "none";
$D('noVNC_extra_keys').style.display = "none";
$D('sendCtrlAltDelButton').style.display = "none";
UI.updateXvpVisualState(0);
UI.updateXvpButton(0);
}

// State change disables viewport dragging.
Expand Down Expand Up @@ -540,6 +540,19 @@ var UI;
}
},

// Disable/enable XVP button
updateXvpButton: function(ver) {
if (ver >= 1) {
$D('xvpButton').style.display = 'inline';
} else {
$D('xvpButton').style.display = 'none';
// Close XVP panel if open
if (UI.xvpOpen === true) {
UI.toggleXvpPanel();
}
}
},

// Show the clipboard panel
toggleClipboardPanel: function() {
// Close the description panel
Expand Down Expand Up @@ -772,19 +785,6 @@ var UI;
}
},

// Disable/enable XVP button
updateXvpVisualState: function(ver) {
if (ver >= 1) {
$D('xvpButton').style.display = 'inline';
} else {
$D('xvpButton').style.display = 'none';
// Close XVP panel if open
if (UI.xvpOpen === true) {
UI.toggleXvpPanel();
}
}
},

// Display the desktop name in the document title
updateDocumentTitle: function(rfb, name) {
document.title = name + " - noVNC";
Expand Down

0 comments on commit 9e45354

Please sign in to comment.