Put 'atom' in window title when no panes are open

Previously the title would revert to 'index.html' when
focus was gained and no panes were open.
This commit is contained in:
Kevin Sawicki 2013-04-03 15:14:42 -07:00
parent d136837c79
commit 0b9f6b14ba
2 changed files with 4 additions and 4 deletions

View File

@ -175,10 +175,10 @@ describe "RootView", ->
expect(rootView.title).toBe "#{item.getTitle()} - #{project.getPath()}"
describe "when the last pane item is removed", ->
it "sets the title to the project's path", ->
it "update the title to contain the project's path", ->
rootView.getActivePane().remove()
expect(rootView.getActivePaneItem()).toBeUndefined()
expect(rootView.title).toBe project.getPath()
expect(rootView.title).toBe "atom -#{project.getPath()}"
describe "when an inactive pane's item changes", ->
it "does not update the title", ->

View File

@ -82,7 +82,7 @@ class RootView extends View
@getActivePane().focus()
false
else
@setTitle(null)
@updateTitle()
focusableChild = this.find("[tabindex=-1]:visible:first")
if focusableChild.length
focusableChild.focus()
@ -115,7 +115,7 @@ class RootView extends View
if item = @getActivePaneItem()
@setTitle("#{item.getTitle?() ? 'untitled'} - #{projectPath}")
else
@setTitle(projectPath)
@setTitle("atom - #{projectPath}")
else
@setTitle('untitled')