Skip to content

Commit

Permalink
#1471: make it possible to disable the top bar
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@18738 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Mar 16, 2018
1 parent 4af39ff commit d5bd2c4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
20 changes: 16 additions & 4 deletions src/html5/connect.html
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ <h4 class="panel-title">Advanced options</h4>
<input type="checkbox" id="swap_keys"> <span>Swap command and control key</span>
</li>
<li class="list-group-item">
<input type="checkbox" id="clock"> <span>Show server clock</span>
<input type="checkbox" id="top_bar"> <span>Show top bar</span>, <input type="checkbox" id="clock"> <span>show server clock</span>
</li>
<li class="list-group-item">
<input type="checkbox" id="video"> <span>Video (experimental) <input type="checkbox" id="mediasource_video"> Native decoding</span>
Expand Down Expand Up @@ -322,7 +322,7 @@ <h4 class="panel-title">Advanced options</h4>
"exit_with_children", "exit_with_client",
"sharing", "steal", "reconnect", "swap_keys",
"video", "mediasource_video",
"ssl", "insecure", "clock",
"ssl", "insecure", "top_bar", "clock",
"debug_main", "debug_keyboard", "debug_mouse", "debug_clipboard", "debug_draw", "debug_audio", "debug_network",
];
for (var i = 0; i < bool_props.length; i++) {
Expand Down Expand Up @@ -537,9 +537,9 @@ <h4 class="panel-title">Advanced options</h4>
var bool_props = ["clipboard", "printing", "file_transfer",
"exit_with_children", "exit_with_client",
"sharing", "steal", "reconnect", "swap_keys",
"video", "mediasource_video", "clock",
"video", "mediasource_video", "top_bar", "clock",
"debug_main", "debug_keyboard", "debug_mouse", "debug_clipboard", "debug_draw", "debug_audio", "debug_network"];
var default_on = ["steal", "clipboard", "printing", "file_transfer", "reconnect", "clock", "exit_with_children", "exit_with_client"];
var default_on = ["steal", "clipboard", "printing", "file_transfer", "reconnect", "top_bar", "clock", "exit_with_children", "exit_with_client"];
if (Utilities.isMacOS()) {
default_on.push("swap_keys");
}
Expand All @@ -549,6 +549,18 @@ <h4 class="panel-title">Advanced options</h4>
document.getElementById(prop).checked = getboolparam(prop, def);
}

var top_bar_checkbox = $("#top_bar");
function set_clock_visibility() {
if (top_bar_checkbox.is(':checked')) {
$("#clock").removeAttr("disabled");
}
else {
$("#clock").attr("disabled", true);
}
}
top_bar_checkbox.change(set_clock_visibility);
set_clock_visibility();

$("#expandopts").click(function() {
$("#hiddenopts").slideToggle();
});
Expand Down
6 changes: 5 additions & 1 deletion src/html5/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ <h3>Version 2.3</h3>
var cdebug = console.debug;
var clog = console.log;

if (!getboolparam("top_bar", true)) {
$("#top_bar").hide();
}

function show_menu(menu_id, event) {
var menu = $("#"+menu_id);
if (menu.is(':visible')) {
Expand Down Expand Up @@ -229,7 +233,7 @@ <h3>Version 2.3</h3>
progress_offset++;
$('#progress-bar').val(progress_value + progress_offset);
if (progress_offset<9) {
progress_timer = window.setTimeout(progress_move_offset, (5+progress_offset)*progress_offset);
progress_timer = window.setTimeout(progress_move_offset, (5+progress_offset)*progress_offset);
}
}

Expand Down

0 comments on commit d5bd2c4

Please sign in to comment.