diff --git a/lib/tree-view-open-files-pane-view.coffee b/lib/tree-view-open-files-pane-view.coffee index 39d0dda..d819569 100644 --- a/lib/tree-view-open-files-pane-view.coffee +++ b/lib/tree-view-open-files-pane-view.coffee @@ -8,7 +8,15 @@ class TreeViewOpenFilesPaneView @items = [] @activeItem = null @paneSub = new CompositeDisposable - + # ----------------------------------------------------------------------------------------------------------- + # Agustin Ignacio Kanner + @headerSpan = document.createElement('span') + @headerSpan.classList.add('name', 'icon', 'icon-file-directory') + @headerSpan.setAttribute('data-name', 'Pane') + #defines a callback for the event that will be produced when the title of the pane change in the configuration + @NameChangeEventSubscription = atom.config.observe 'tree-view-open-files.title', + (title) => @headerSpan.innerText = title + #------------------------------------------------------------------------------------------------------------- @element = document.createElement('ul') @element.classList.add('list-tree', 'has-collapsable-children') nested = document.createElement('li') @@ -17,12 +25,7 @@ class TreeViewOpenFilesPaneView @container.classList.add('list-tree') header = document.createElement('div') header.classList.add('list-item') - - headerSpan = document.createElement('span') - headerSpan.classList.add('name', 'icon', 'icon-file-directory') - headerSpan.setAttribute('data-name', 'Pane') - headerSpan.innerText = 'Pane' - header.appendChild headerSpan + header.appendChild @headerSpan nested.appendChild header nested.appendChild @container @element.appendChild nested @@ -124,3 +127,4 @@ class TreeViewOpenFilesPaneView destroy: -> @element.remove() @paneSub.dispose() + @NameChangeEventSubscription.dispose() diff --git a/lib/tree-view-open-files.coffee b/lib/tree-view-open-files.coffee index c31f2cb..2ff8888 100644 --- a/lib/tree-view-open-files.coffee +++ b/lib/tree-view-open-files.coffee @@ -10,6 +10,11 @@ module.exports = default: 250 min: 0 description: 'Maximum height of the list before scrolling is required. Set to 0 to disable scrolling.' + # Agustin Ignacio Kanner + title: + type: 'string' + default: 'WORKING FILES' + description: 'Title of the panel' activate: (state) -> requirePackages('tree-view').then ([treeView]) =>