 
             isPinned: e.classList.contains 'pinned'
         }
-
-
-    # Close all unpinned tabs
-    closeUnpinned: ->
-        activePane = document.querySelector '.pane.active'
-        tabbar = activePane.querySelector '.tab-bar'
-
-        activePane = atom.workspace.getActivePane()
-        tabs = tabbar.querySelectorAll '.tab'
-        for i in [(tabs.length - 1)..0]
-            if !tabs[i].classList.contains('pinned')
-                activePane.itemAtIndex i
-                activePane.destroyItem activePane.itemAtIndex(i)

            else
                body.classList.add 'pinned-tabs-enable-modified'

    # Observer panes
    observers: ->
        atom.workspace.onDidAddPaneItem (event) =>
            setTimeout (=>
                # Get information about the tab

    serialize: ->
        @PinnedTabsState.serialize()

    setCommands: ->
        @subscriptions = new CompositeDisposable
        @subscriptions.add atom.commands.add 'atom-workspace', 'pinned-tabs:pin': => @pinActive()
        @subscriptions.add atom.commands.add 'atom-workspace', 'pinned-tabs:pin-selected': => @pinSelected()
        @subscriptions.add atom.commands.add 'atom-workspace', 'pinned-tabs:close-unpinned': => @closeUnpinnedTabs()

    observers: ->
        # Config observers
        body = document.querySelector 'body'
        atom.config.observe 'pinned-tabs.animation', (newValue) ->
            if newValue
