mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
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:
@@ -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", ->
|
||||
|
||||
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user