Skip to content

Commit

Permalink
Merge pull request #7 from frk1705/useDependencies
Browse files Browse the repository at this point in the history
this worked flawlessly.  Thanks so much.. I'll close #3 as well!
  • Loading branch information
ddavison committed May 31, 2014
2 parents 16beac9 + 7f4e84c commit a0eae93
Show file tree
Hide file tree
Showing 56 changed files with 32 additions and 4,461 deletions.
2 changes: 1 addition & 1 deletion lib/sublime-tab-bar-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ RendererIpc = require('ipc')

{$} = require 'atom'
_ = require 'underscore-plus'
TabBarView = require './tabs/lib/tab-bar-view'
TabBarView = require atom.packages.resolvePackagePath('tabs') + '/lib/tab-bar-view'
SublimeTabView = require './sublime-tab-view'

module.exports =
Expand Down
2 changes: 1 addition & 1 deletion lib/sublime-tab-view.coffee
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{$} = require 'atom'
_ = require 'underscore-plus'
path = require 'path'
TabView = require './tabs/lib/tab-view'
TabView = require atom.packages.resolvePackagePath('tabs') + '/lib/tab-view'

module.exports =
class SublimeTabView extends TabView
Expand Down
24 changes: 24 additions & 0 deletions lib/sublime-tabs.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ module.exports =
treeView: null

activate: (@state) ->
@forceSettings()

# tabs
@paneSubscription = atom.workspaceView.eachPaneView (paneView) =>
tabBarView = new SublimeTabBarView(paneView)
Expand Down Expand Up @@ -77,3 +79,25 @@ module.exports =
atom.project.getPath() is atom.getLoadSettings().pathToOpen
else
true

forceSettings: ->
@forceSettingKey('tabs','showIcons')
atom.config.observe 'sublime-tabs.' + 'showIcons', =>
@forceSettingKey('tabs','showIcons')

@forceSettingKey('tree-view','hideVcsIgnoredFiles')
atom.config.observe 'sublime-tabs.' + 'hideVcsIgnoredFiles', =>
@forceSettingKey('tree-view','hideVcsIgnoredFiles')

@forceSettingKey('tree-view','hideIgnoredNames')
atom.config.observe 'sublime-tabs.' + 'hideIgnoredNames', =>
@forceSettingKey('tree-view','hideIgnoredNames')

@forceSettingKey('tree-view','showOnRightSide')
atom.config.observe 'sublime-tabs.' + 'showOnRightSide', =>
@forceSettingKey('tree-view','showOnRightSide')

forceSettingKey: (masterKey, key) ->
value = atom.config.get 'sublime-tabs.' + "#{key}"
value ?= atom.config.getDefault 'sublime-tabs.' + "#{key}"
atom.config.set(masterKey + '.' + key, atom.config.get('sublime-tabs.' + "#{key}"))
12 changes: 6 additions & 6 deletions lib/sublime-tree-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ shell = require 'shell'
_ = require 'underscore-plus'
{$, BufferedProcess} = require 'atom'
fs = require 'fs-plus'
TreeView = require './tree-view/lib/tree-view'
TreeView = require atom.packages.resolvePackagePath('tree-view') + '/lib/tree-view'

AddDialog = null # Defer requiring until actually needed
MoveDialog = null # Defer requiring until actually needed
CopyDialog = null # Defer requiring until actually needed

Directory = require './tree-view/lib/directory'
DirectoryView = require './tree-view/lib/directory-view'
File = require './tree-view/lib/file'
FileView = require './tree-view/lib/file-view'
Directory = require atom.packages.resolvePackagePath('tree-view') + '/lib/directory'
DirectoryView = require atom.packages.resolvePackagePath('tree-view') + '/lib/directory-view'
File = require atom.packages.resolvePackagePath('tree-view') + '/lib/file'
FileView = require atom.packages.resolvePackagePath('tree-view') + '/lib/file-view'
LocalStorage = window.localStorage

module.exports =
class SublimeTreeView extends TreeView
initialize: (state) ->
super(state)

@on 'dblclick', '.entry', (e) =>
@on 'dblclick', '.entry', (e) ->
return if e.shiftKey || e.metaKey
atom.workspaceView.find('.tab-bar .tab.active').removeClass('temp')

Expand Down
1 change: 0 additions & 1 deletion lib/tabs/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions lib/tabs/.travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion lib/tabs/CONTRIBUTING.md

This file was deleted.

20 changes: 0 additions & 20 deletions lib/tabs/LICENSE.md

This file was deleted.

5 changes: 0 additions & 5 deletions lib/tabs/README.md

This file was deleted.

Loading

0 comments on commit a0eae93

Please sign in to comment.