mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
project title setting. gross.
needs to be in tabs.coffee until we have resource close events or something
This commit is contained in:
@@ -56,6 +56,7 @@ class TabsPane extends Pane
|
||||
if tabsLength is 1
|
||||
@removeTab activePath
|
||||
$('#main-container').children().css 'display', 'none !important'
|
||||
window.setTitle window.resource.title()
|
||||
else if tabsLength > 0
|
||||
@removeTab activePath
|
||||
@prevTab()
|
||||
|
||||
@@ -36,6 +36,7 @@ class Project extends Resource
|
||||
return false if not fs.isDirectory url
|
||||
|
||||
@url = url
|
||||
window.setTitle @title()
|
||||
atom.trigger 'project:open', this
|
||||
|
||||
true
|
||||
@@ -69,6 +70,9 @@ class Project extends Resource
|
||||
save: ->
|
||||
@activeResource?.save()
|
||||
|
||||
title: ->
|
||||
_.last @url.split '/'
|
||||
|
||||
# Determines if a passed URL is a child of @url.
|
||||
# Returns a Boolean.
|
||||
childURL: (url) ->
|
||||
|
||||
Reference in New Issue
Block a user