Option to hide console menubar

Add option in the config file to hide the menu (Github issue #69)
This commit is contained in:
Duncan Ferguson 2016-09-07 09:25:44 +01:00
parent 7822d337f7
commit 7974687cfb
5 changed files with 15 additions and 1 deletions

View file

@ -1325,6 +1325,9 @@ sub re_add_closed_sessions() {
sub build_hosts_menu() {
my ($self) = @_;
return if ( $self->config->{hide_menu} );
$self->debug( 2, "Building hosts menu" );
# first, empty the hosts menu from the last static entry + 1 on
@ -1800,7 +1803,9 @@ sub create_menubar() {
my ($self) = @_;
$self->debug( 2, "create_menubar: started" );
$menus{bar} = $windows{main_window}->Menu();
$windows{main_window}->configure( -menu => $menus{bar}, );
$windows{main_window}->configure( -menu => $menus{bar}, )
unless $self->config->{hide_menu};
$menus{file} = $menus{bar}->cascade(
-label => 'File',

View file

@ -85,6 +85,7 @@ my %default_config = (
history_height => 10,
command => q{},
hide_menu => 0,
max_host_menu_items => 30,
macros_enabled => 'yes',

View file

@ -668,6 +668,11 @@ If the external command is given a C<-L> option it should output a list of tags
'L<KEY SHORTCUTS>'
);
output '=item hide_menu = 0';
output $self->loc(
q{If set to 1, hide the menu bar (File, Hosts, Send, Help) in the console.},
);
output '=item key_clientname = Alt-n';
output $self->loc(
q{Default key sequence to send cssh client names to client. See [_1] for more information.},