@@ -50,17 +50,23 @@ export function activate(context: vscode.ExtensionContext) {
5050 // This line of code will only be executed once when your extension is activated
5151 console . log ( 'Activing "vscode-gitextensions" extension.' ) ;
5252
53- const statusHistory = window . createStatusBarItem ( vscode . StatusBarAlignment . Right , 500 ) ;
54- statusHistory . command = 'extension.gitextensions.filehistory' ;
55- statusHistory . text = '$(history)' ;
56- statusHistory . tooltip = 'See current file history in GitExtensions' ;
57- statusHistory . show ( ) ;
58-
59- const statusBrowse = window . createStatusBarItem ( vscode . StatusBarAlignment . Right , 500 ) ;
60- statusBrowse . command = 'extension.gitextensions.browse' ;
61- statusBrowse . text = '$(git-branch)' ;
62- statusBrowse . tooltip = 'Browse repository in GitExtensions' ;
63- statusBrowse . show ( ) ;
53+ const shouldDisplayFileHistoryIcon = vscode . workspace . getConfiguration ( ) . get ( 'gitExtensions.statusbar.filehistory' ) ;
54+ if ( shouldDisplayFileHistoryIcon ) {
55+ const statusHistory = window . createStatusBarItem ( vscode . StatusBarAlignment . Right , 500 ) ;
56+ statusHistory . command = 'extension.gitextensions.filehistory' ;
57+ statusHistory . text = '$(history)' ;
58+ statusHistory . tooltip = 'See current file history in GitExtensions' ;
59+ statusHistory . show ( ) ;
60+ }
61+
62+ const shouldDisplayBrowseIcon = vscode . workspace . getConfiguration ( ) . get ( 'gitExtensions.statusbar.browse' ) ;
63+ if ( shouldDisplayBrowseIcon ) {
64+ const statusBrowse = window . createStatusBarItem ( vscode . StatusBarAlignment . Right , 500 ) ;
65+ statusBrowse . command = 'extension.gitextensions.browse' ;
66+ statusBrowse . text = '$(git-branch)' ;
67+ statusBrowse . tooltip = 'Browse repository in GitExtensions' ;
68+ statusBrowse . show ( ) ;
69+ }
6470
6571 // The command has been defined in the package.json file
6672 // Now provide the implementation of the command with registerCommand
0 commit comments